From 757b8d5d425b39b1bf56bcef3ec344d16fc376db Mon Sep 17 00:00:00 2001 From: granny Date: Tue, 25 Nov 2025 22:27:20 -0800 Subject: [PATCH] apply minecraft server file patches --- .../activation/ActivationRange.java.patch | 12 +-- .../net/minecraft/CrashReport.java.patch | 16 +--- .../commands/CommandSourceStack.java.patch | 18 ++--- .../minecraft/commands/Commands.java.patch | 16 +--- .../selector/EntitySelector.java.patch | 12 +-- .../net/minecraft/core/BlockPos.java.patch | 10 +-- .../dispenser/DispenseItemBehavior.java.patch | 10 +-- .../EquipmentDispenseItemBehavior.java.patch | 10 +-- .../framework/GameTestHelper.java.patch | 11 +++ .../gametest/framework/TestCommand.java.patch | 10 +-- .../minecraft/network/Connection.java.patch | 10 +-- .../chat/SignedMessageChain.java.patch | 10 +-- .../net/minecraft/server/Main.java.patch | 10 +-- .../server/MinecraftServer.java.patch | 31 +++----- .../server/PlayerAdvancements.java.patch | 16 +--- .../server/commands/EnchantCommand.java.patch | 12 +-- .../commands/GameModeCommand.java.patch | 10 +-- .../server/commands/GiveCommand.java.patch | 10 +-- .../dedicated/DedicatedServer.java.patch | 22 ++---- .../DedicatedServerProperties.java.patch | 10 +-- .../server/gui/MinecraftServerGui.java.patch | 31 +++----- .../server/gui/StatsComponent.java.patch | 10 +-- .../server/level/ServerLevel.java.patch | 68 ++++++++--------- .../server/level/ServerPlayer.java.patch | 75 +++++++++---------- .../level/ServerPlayerGameMode.java.patch | 16 +--- .../server/level/WorldGenRegion.java.patch | 10 +-- .../ServerCommonPacketListenerImpl.java.patch | 22 ++---- .../ServerGamePacketListenerImpl.java.patch | 46 +++++------- .../ServerLoginPacketListenerImpl.java.patch | 10 +-- .../ServerStatusPacketListenerImpl.java.patch | 10 +-- .../server/players/PlayerList.java.patch | 36 +++------ .../server/players/SleepStatus.java.patch | 12 +-- .../stats/ServerRecipeBook.java.patch | 10 +-- .../net/minecraft/util/StringUtil.java.patch | 10 +-- .../world/damagesource/CombatRules.java.patch | 12 +-- .../damagesource/CombatTracker.java.patch | 12 +-- .../damagesource/DamageSource.java.patch | 25 ++----- .../damagesource/DamageSources.java.patch | 20 ++--- .../world/effect/HungerMobEffect.java.patch | 10 +-- .../world/effect/PoisonMobEffect.java.patch | 10 +-- .../effect/RegenerationMobEffect.java.patch | 10 +-- .../effect/SaturationMobEffect.java.patch | 10 +-- .../world/effect/WitherMobEffect.java.patch | 10 +-- .../minecraft/world/entity/Entity.java.patch | 42 +++++------ .../world/entity/EntitySelector.java.patch | 10 +-- .../world/entity/EntityType.java.patch | 20 ++--- .../world/entity/ExperienceOrb.java.patch | 12 +-- .../world/entity/LivingEntity.java.patch | 65 ++++++++-------- .../net/minecraft/world/entity/Mob.java.patch | 32 +++----- .../ai/attributes/RangedAttribute.java.patch | 10 +++ .../entity/ai/behavior/AcquirePoi.java.patch | 10 +-- .../ai/behavior/InteractWithDoor.java.patch | 14 +--- .../ai/behavior/ShowTradesToPlayer.java.patch | 10 +-- ...TransportItemsBetweenContainers.java.patch | 14 +--- .../ai/goal/LlamaFollowCaravanGoal.java.patch | 12 +-- .../ai/goal/RangedBowAttackGoal.java.patch | 10 +-- .../ai/goal/RunAroundLikeCrazyGoal.java.patch | 10 +-- .../world/entity/ai/goal/SwellGoal.java.patch | 10 +-- .../ai/sensing/NearestBedSensor.java.patch | 10 +-- .../targeting/TargetingConditions.java.patch | 10 +-- .../world/entity/animal/Animal.java.patch | 12 +-- .../world/entity/animal/bee}/Bee.java.patch | 36 ++++----- .../entity/animal/cow}/AbstractCow.java.patch | 18 ++--- .../entity/animal/cow}/MushroomCow.java.patch | 14 +--- .../entity/animal/dolphin}/Dolphin.java.patch | 24 ++---- .../entity/animal/equine}/Llama.java.patch | 28 +++---- .../entity/animal/feline}/Cat.java.patch | 20 ++--- .../entity/animal/feline/Ocelot.java.patch | 11 +++ .../animal/fish}/WaterAnimal.java.patch | 14 +--- .../world/entity/animal/fox}/Fox.java.patch | 26 +++---- .../world/entity/animal/goat/Goat.java.patch | 10 +-- .../animal/golem}/CopperGolem.java.patch | 20 ++--- .../animal/golem}/CopperGolemAi.java.patch | 16 +--- .../entity/animal/golem}/IronGolem.java.patch | 26 +++---- .../entity/animal/golem}/SnowGolem.java.patch | 18 ++--- .../entity/animal/parrot}/Parrot.java.patch | 27 +++---- .../world/entity/animal/pig}/Pig.java.patch | 14 +--- .../animal/polarbear}/PolarBear.java.patch | 22 ++---- .../entity/animal/rabbit}/Rabbit.java.patch | 14 +--- .../entity/animal/squid/GlowSquid.java.patch | 16 ++++ .../entity/animal/squid}/Squid.java.patch | 18 ++--- .../world/entity/animal/wolf/Wolf.java.patch | 28 +++---- .../boss/enderdragon/EndCrystal.java.patch | 14 +--- .../boss/enderdragon/EnderDragon.java.patch | 14 +--- .../entity/boss/wither/WitherBoss.java.patch | 22 ++---- .../entity/decoration/ArmorStand.java.patch | 14 +--- .../world/entity/item/ItemEntity.java.patch | 16 +--- .../world/entity/item/PrimedTnt.java.patch | 10 +-- .../world/entity/monster/Creeper.java.patch | 16 +--- .../world/entity/monster/EnderMan.java.patch | 26 +++---- .../world/entity/monster/Endermite.java.patch | 12 +-- .../world/entity/monster/Ghast.java.patch | 10 +-- .../world/entity/monster/Guardian.java.patch | 10 +-- .../world/entity/monster/MagmaCube.java.patch | 10 +-- .../world/entity/monster/Monster.java.patch | 14 +--- .../world/entity/monster/Phantom.java.patch | 10 +-- .../world/entity/monster/Ravager.java.patch | 12 +-- .../world/entity/monster/Shulker.java.patch | 16 +--- .../world/entity/monster/Slime.java.patch | 10 +-- .../world/entity/monster/Strider.java.patch | 10 +-- .../entity/monster/hoglin/Hoglin.java.patch | 10 +-- .../monster/illager/Vindicator.java.patch | 14 ++++ .../entity/monster/piglin/Piglin.java.patch | 10 +-- .../entity/monster/piglin/PiglinAi.java.patch | 17 +---- .../skeleton/AbstractSkeleton.java.patch | 20 +++++ .../monster/skeleton}/Skeleton.java.patch | 14 +--- .../entity/monster/warden/WardenAi.java.patch | 10 +-- .../entity/monster/zombie}/Drowned.java.patch | 14 +--- .../entity/monster/zombie}/Zombie.java.patch | 31 +++----- .../monster/zombie}/ZombieVillager.java.patch | 14 +--- .../zombie}/ZombifiedPiglin.java.patch | 18 ++--- .../world/entity/npc/CatSpawner.java.patch | 14 +--- .../entity/npc/villager}/Villager.java.patch | 28 +++---- .../WanderingTrader.java.patch | 18 ++--- .../WanderingTraderSpawner.java.patch | 14 +--- .../world/entity/player/Player.java.patch | 48 +++++------- .../arrow}/AbstractArrow.java.patch | 28 +++---- .../arrow}/ThrownTrident.java.patch | 14 +--- .../hurtingprojectile}/WitherSkull.java.patch | 22 ++---- .../Snowball.java.patch | 19 ++--- .../ThrownEnderpearl.java.patch | 16 +--- .../world/entity/raid/Raids.java.patch | 42 +++++++++++ .../vehicle/boat/AbstractBoat.java.patch | 10 +++ .../minecart}/NewMinecartBehavior.java.patch | 14 +--- .../minecart}/OldMinecartBehavior.java.patch | 14 +--- .../minecraft/world/food/FoodData.java.patch | 12 +-- .../world/food/FoodProperties.java.patch | 10 +-- .../AbstractContainerMenu.java.patch | 10 +++ .../inventory/AbstractFurnaceMenu.java.patch | 10 +-- .../world/inventory/AnvilMenu.java.patch | 28 +++---- .../world/inventory/ArmorSlot.java.patch | 10 +-- .../inventory/EnchantmentMenu.java.patch | 14 +--- .../world/inventory/GrindstoneMenu.java.patch | 18 ++--- .../inventory/ItemCombinerMenu.java.patch | 12 +++ .../minecraft/world/item/AxeItem.java.patch | 14 +--- .../minecraft/world/item/BlockItem.java.patch | 16 +--- .../minecraft/world/item/BowItem.java.patch | 14 +--- .../world/item/CrossbowItem.java.patch | 10 +-- .../minecraft/world/item/DyeColor.java.patch | 10 +-- .../minecraft/world/item/EggItem.java.patch | 10 +-- .../world/item/EndCrystalItem.java.patch | 10 +-- .../world/item/EnderpearlItem.java.patch | 12 +-- .../minecraft/world/item/HoeItem.java.patch | 10 +-- .../minecraft/world/item/ItemStack.java.patch | 22 ++---- .../net/minecraft/world/item/Items.java.patch | 12 +-- .../minecraft/world/item/MapItem.java.patch | 10 +-- .../world/item/NameTagItem.java.patch | 10 +-- .../item/ProjectileWeaponItem.java.patch | 11 +++ .../world/item/ShovelItem.java.patch | 10 +-- .../world/item/SnowballItem.java.patch | 10 +-- .../world/item/SpawnEggItem.java.patch | 10 +-- .../world/item/ThrowablePotionItem.java.patch | 10 +-- .../world/item/TridentItem.java.patch | 12 +-- ...arAllStatusEffectsConsumeEffect.java.patch | 10 +-- .../world/item/crafting/Ingredient.java.patch | 22 ++++++ .../enchantment/EnchantmentHelper.java.patch | 10 +-- .../enchantment/ItemEnchantments.java.patch | 16 +--- .../item/trading/MerchantOffer.java.patch | 10 +-- .../world/level/BaseSpawner.java.patch | 10 +-- .../world/level/EntityGetter.java.patch | 10 +-- .../minecraft/world/level/Level.java.patch | 14 +--- .../world/level/NaturalSpawner.java.patch | 10 +-- .../world/level/ServerExplosion.java.patch | 10 +-- .../world/level/block/AnvilBlock.java.patch | 10 +-- .../world/level/block/AzaleaBlock.java.patch | 10 +-- .../block/BaseCoralPlantTypeBlock.java.patch | 10 +++ .../world/level/block/BedBlock.java.patch | 18 ++--- .../level/block/BigDripleafBlock.java.patch | 11 +++ .../world/level/block/Block.java.patch | 23 ++---- .../world/level/block/Blocks.java.patch | 12 +-- .../level/block/BubbleColumnBlock.java.patch | 10 +-- .../world/level/block/CactusBlock.java.patch | 14 +--- .../world/level/block/CakeBlock.java.patch | 10 +-- .../level/block/CampfireBlock.java.patch | 10 +-- .../level/block/CarvedPumpkinBlock.java.patch | 16 +--- .../level/block/CauldronBlock.java.patch | 10 +-- .../level/block/CaveVinesBlock.java.patch | 10 +-- .../block/ChangeOverTimeBlock.java.patch | 10 +-- .../world/level/block/ChestBlock.java.patch | 10 +-- .../level/block/ComposterBlock.java.patch | 20 ++--- .../world/level/block/CoralBlock.java.patch | 10 +-- .../world/level/block/CropBlock.java.patch | 16 +--- .../world/level/block/DoorBlock.java.patch | 12 +-- .../level/block/DragonEggBlock.java.patch | 10 +++ .../world/level/block/FarmBlock.java.patch | 16 +--- .../block/GrowingPlantHeadBlock.java.patch | 18 ++--- .../world/level/block/HayBlock.java.patch | 10 +++ .../world/level/block/KelpBlock.java.patch | 14 ++++ .../world/level/block/LiquidBlock.java.patch | 14 +--- .../world/level/block/MagmaBlock.java.patch | 10 +-- .../level/block/NetherPortalBlock.java.patch | 18 ++--- .../level/block/NetherWartBlock.java.patch | 12 +-- .../world/level/block/NoteBlock.java.patch | 10 +-- .../level/block/ObserverBlock.java.patch | 10 +-- .../block/PointedDripstoneBlock.java.patch | 10 +-- .../level/block/PoweredRailBlock.java.patch | 10 +-- .../level/block/RespawnAnchorBlock.java.patch | 10 +-- .../level/block/SculkShriekerBlock.java.patch | 14 +--- .../world/level/block/SlabBlock.java.patch | 10 +-- .../level/block/SnowLayerBlock.java.patch | 10 +-- .../world/level/block/SpawnerBlock.java.patch | 16 +--- .../world/level/block/SpongeBlock.java.patch | 14 +--- .../level/block/StonecutterBlock.java.patch | 10 +-- .../level/block/SugarCaneBlock.java.patch | 12 +-- .../level/block/TurtleEggBlock.java.patch | 23 +----- .../level/block/TwistingVinesBlock.java.patch | 10 +-- .../level/block/VegetationBlock.java.patch | 10 +-- .../level/block/WeepingVinesBlock.java.patch | 10 +-- .../level/block/WitherSkullBlock.java.patch | 10 +-- .../AbstractFurnaceBlockEntity.java.patch | 12 +-- .../block/entity/BeaconBlockEntity.java.patch | 16 +--- .../entity/BeehiveBlockEntity.java.patch | 14 +--- .../level/block/entity/BlockEntity.java.patch | 14 +--- .../entity/ConduitBlockEntity.java.patch | 19 ++--- .../EnchantingTableBlockEntity.java.patch | 18 ++--- .../block/entity/SignBlockEntity.java.patch | 20 ++--- .../piston/PistonStructureResolver.java.patch | 14 +--- .../chunk/storage/EntityStorage.java.patch | 10 +-- .../storage/RegionFileStorage.java.patch | 10 +-- .../levelgen/DensityFunctions.java.patch | 10 +-- .../level/levelgen/PhantomSpawner.java.patch | 12 +-- .../level/material/FlowingFluid.java.patch | 18 ++--- .../world/level/material/LavaFluid.java.patch | 25 +++++++ .../level/material/WaterFluid.java.patch | 16 ++++ .../pathfinder/WalkNodeEvaluator.java.patch | 12 +-- .../world/level/portal/PortalShape.java.patch | 10 +-- .../maps/MapItemSavedData.java.patch | 10 +-- .../EnchantedCountIncreaseFunction.java.patch | 10 +-- .../net/minecraft/world/phys/AABB.java.patch | 10 +-- .../framework/GameTestHelper.java.patch | 19 ----- .../world/entity/GlowSquid.java.patch | 24 ------ .../ai/attributes/RangedAttribute.java.patch | 18 ----- .../world/entity/ambient/Bat.java.patch | 27 ------- .../world/entity/animal/Ocelot.java.patch | 19 ----- .../monster/AbstractSkeleton.java.patch | 31 -------- .../entity/monster/Vindicator.java.patch | 22 ------ .../world/entity/raid/Raids.java.patch | 50 ------------- .../entity/vehicle/AbstractBoat.java.patch | 18 ----- .../AbstractContainerMenu.java.patch | 18 ----- .../inventory/ItemCombinerMenu.java.patch | 20 ----- .../world/item/BucketItem.java.patch | 28 ------- .../item/ProjectileWeaponItem.java.patch | 19 ----- .../world/item/crafting/Ingredient.java.patch | 30 -------- .../block/BaseCoralPlantTypeBlock.java.patch | 18 ----- .../level/block/BigDripleafBlock.java.patch | 19 ----- .../level/block/DragonEggBlock.java.patch | 18 ----- .../world/level/block/HayBlock.java.patch | 18 ----- .../world/level/block/IceBlock.java.patch | 28 ------- .../world/level/block/KelpBlock.java.patch | 22 ------ .../world/level/material/LavaFluid.java.patch | 33 -------- .../level/material/WaterFluid.java.patch | 24 ------ 251 files changed, 1060 insertions(+), 2988 deletions(-) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/io/papermc/paper/entity/activation/ActivationRange.java.patch (67%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/CrashReport.java.patch (66%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/commands/CommandSourceStack.java.patch (74%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/commands/Commands.java.patch (84%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/commands/arguments/selector/EntitySelector.java.patch (85%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/core/BlockPos.java.patch (53%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch (77%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch (62%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/GameTestHelper.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/gametest/framework/TestCommand.java.patch (54%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/network/Connection.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/network/chat/SignedMessageChain.java.patch (68%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/Main.java.patch (75%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/MinecraftServer.java.patch (81%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/PlayerAdvancements.java.patch (64%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/commands/EnchantCommand.java.patch (75%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/commands/GameModeCommand.java.patch (69%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/commands/GiveCommand.java.patch (62%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/dedicated/DedicatedServer.java.patch (81%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch (61%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/gui/MinecraftServerGui.java.patch (84%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/gui/StatsComponent.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/level/ServerLevel.java.patch (80%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/level/ServerPlayer.java.patch (80%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/level/ServerPlayerGameMode.java.patch (83%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/level/WorldGenRegion.java.patch (50%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch (77%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch (90%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch (70%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch (59%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/players/PlayerList.java.patch (72%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/server/players/SleepStatus.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/stats/ServerRecipeBook.java.patch (60%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/util/StringUtil.java.patch (52%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/damagesource/CombatRules.java.patch (69%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/damagesource/CombatTracker.java.patch (79%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/damagesource/DamageSource.java.patch (80%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/damagesource/DamageSources.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/effect/HungerMobEffect.java.patch (62%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/effect/PoisonMobEffect.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/effect/RegenerationMobEffect.java.patch (57%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/effect/SaturationMobEffect.java.patch (67%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/effect/WitherMobEffect.java.patch (51%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/Entity.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/EntitySelector.java.patch (62%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/EntityType.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ExperienceOrb.java.patch (77%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/LivingEntity.java.patch (83%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/Mob.java.patch (72%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/attributes/RangedAttribute.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch (80%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java.patch (52%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java.patch (53%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/goal/SwellGoal.java.patch (66%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java.patch (68%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/ai/targeting/TargetingConditions.java.patch (59%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/animal/Animal.java.patch (83%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/bee}/Bee.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/cow}/AbstractCow.java.patch (87%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/cow}/MushroomCow.java.patch (59%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/dolphin}/Dolphin.java.patch (77%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal/horse => sources/net/minecraft/world/entity/animal/equine}/Llama.java.patch (59%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/feline}/Cat.java.patch (61%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/feline/Ocelot.java.patch rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/fish}/WaterAnimal.java.patch (56%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/fox}/Fox.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/animal/goat/Goat.java.patch (57%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal/coppergolem => sources/net/minecraft/world/entity/animal/golem}/CopperGolem.java.patch (65%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal/coppergolem => sources/net/minecraft/world/entity/animal/golem}/CopperGolemAi.java.patch (69%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/golem}/IronGolem.java.patch (68%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/golem}/SnowGolem.java.patch (77%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/parrot}/Parrot.java.patch (67%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/pig}/Pig.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/polarbear}/PolarBear.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/rabbit}/Rabbit.java.patch (67%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/squid/GlowSquid.java.patch rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/animal => sources/net/minecraft/world/entity/animal/squid}/Squid.java.patch (77%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/animal/wolf/Wolf.java.patch (88%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch (84%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch (52%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch (76%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/decoration/ArmorStand.java.patch (76%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/item/ItemEntity.java.patch (77%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/item/PrimedTnt.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Creeper.java.patch (86%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/EnderMan.java.patch (79%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Endermite.java.patch (74%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Ghast.java.patch (61%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Guardian.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/MagmaCube.java.patch (58%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Monster.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Phantom.java.patch (62%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Ravager.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Shulker.java.patch (83%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Slime.java.patch (62%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/Strider.java.patch (68%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch (57%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/illager/Vindicator.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/piglin/Piglin.java.patch (55%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch (72%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/skeleton/AbstractSkeleton.java.patch rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/monster => sources/net/minecraft/world/entity/monster/skeleton}/Skeleton.java.patch (84%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/monster/warden/WardenAi.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/monster => sources/net/minecraft/world/entity/monster/zombie}/Drowned.java.patch (79%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/monster => sources/net/minecraft/world/entity/monster/zombie}/Zombie.java.patch (54%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/monster => sources/net/minecraft/world/entity/monster/zombie}/ZombieVillager.java.patch (60%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/monster => sources/net/minecraft/world/entity/monster/zombie}/ZombifiedPiglin.java.patch (66%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/npc/CatSpawner.java.patch (77%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/npc => sources/net/minecraft/world/entity/npc/villager}/Villager.java.patch (83%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/npc => sources/net/minecraft/world/entity/npc/wanderingtrader}/WanderingTrader.java.patch (64%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/npc => sources/net/minecraft/world/entity/npc/wanderingtrader}/WanderingTraderSpawner.java.patch (65%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/entity/player/Player.java.patch (69%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/projectile => sources/net/minecraft/world/entity/projectile/arrow}/AbstractArrow.java.patch (60%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/projectile => sources/net/minecraft/world/entity/projectile/arrow}/ThrownTrident.java.patch (53%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/projectile => sources/net/minecraft/world/entity/projectile/hurtingprojectile}/WitherSkull.java.patch (57%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/projectile => sources/net/minecraft/world/entity/projectile/throwableitemprojectile}/Snowball.java.patch (82%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/projectile => sources/net/minecraft/world/entity/projectile/throwableitemprojectile}/ThrownEnderpearl.java.patch (71%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/entity/raid/Raids.java.patch create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/boat/AbstractBoat.java.patch rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/vehicle => sources/net/minecraft/world/entity/vehicle/minecart}/NewMinecartBehavior.java.patch (52%) rename purpur-server/minecraft-patches/{unapplied-sources/net/minecraft/world/entity/vehicle => sources/net/minecraft/world/entity/vehicle/minecart}/OldMinecartBehavior.java.patch (56%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/food/FoodData.java.patch (75%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/food/FoodProperties.java.patch (66%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch (64%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/inventory/AnvilMenu.java.patch (91%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/inventory/ArmorSlot.java.patch (62%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/inventory/EnchantmentMenu.java.patch (79%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/inventory/GrindstoneMenu.java.patch (89%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/AxeItem.java.patch (90%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/BlockItem.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/BowItem.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/CrossbowItem.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/DyeColor.java.patch (55%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/EggItem.java.patch (72%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/EndCrystalItem.java.patch (60%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/EnderpearlItem.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/HoeItem.java.patch (82%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/ItemStack.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/Items.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/MapItem.java.patch (53%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/NameTagItem.java.patch (64%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/ShovelItem.java.patch (74%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/SnowballItem.java.patch (72%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/SpawnEggItem.java.patch (84%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/ThrowablePotionItem.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/TridentItem.java.patch (75%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch (62%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/item/crafting/Ingredient.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/enchantment/EnchantmentHelper.java.patch (84%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/item/trading/MerchantOffer.java.patch (66%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/BaseSpawner.java.patch (53%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/EntityGetter.java.patch (58%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/Level.java.patch (85%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/NaturalSpawner.java.patch (65%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/ServerExplosion.java.patch (80%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/AnvilBlock.java.patch (89%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/AzaleaBlock.java.patch (70%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/BedBlock.java.patch (68%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/Block.java.patch (85%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/Blocks.java.patch (59%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/BubbleColumnBlock.java.patch (66%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/CactusBlock.java.patch (80%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/CakeBlock.java.patch (59%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/CampfireBlock.java.patch (52%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch (80%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/CauldronBlock.java.patch (60%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/CaveVinesBlock.java.patch (53%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch (52%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/ChestBlock.java.patch (50%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/ComposterBlock.java.patch (82%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/CoralBlock.java.patch (54%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/CropBlock.java.patch (70%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/DoorBlock.java.patch (75%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DragonEggBlock.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/FarmBlock.java.patch (82%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch (77%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/HayBlock.java.patch create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/KelpBlock.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/LiquidBlock.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/MagmaBlock.java.patch (57%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/NetherPortalBlock.java.patch (58%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/NetherWartBlock.java.patch (81%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/NoteBlock.java.patch (59%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/ObserverBlock.java.patch (54%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/PoweredRailBlock.java.patch (51%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch (62%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/SculkShriekerBlock.java.patch (50%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/SlabBlock.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/SnowLayerBlock.java.patch (56%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/SpawnerBlock.java.patch (89%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/SpongeBlock.java.patch (80%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/StonecutterBlock.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/SugarCaneBlock.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/TurtleEggBlock.java.patch (64%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/TwistingVinesBlock.java.patch (50%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/VegetationBlock.java.patch (78%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/WeepingVinesBlock.java.patch (50%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/WitherSkullBlock.java.patch (59%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch (73%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch (76%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/entity/BlockEntity.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch (82%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java.patch (71%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch (85%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/block/piston/PistonStructureResolver.java.patch (65%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/chunk/storage/EntityStorage.java.patch (56%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch (68%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/levelgen/DensityFunctions.java.patch (63%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch (85%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/material/FlowingFluid.java.patch (62%) create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch create mode 100644 purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/WaterFluid.java.patch rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch (70%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/portal/PortalShape.java.patch (64%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch (50%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch (64%) rename purpur-server/minecraft-patches/{unapplied-sources => sources}/net/minecraft/world/phys/AABB.java.patch (54%) delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/gametest/framework/GameTestHelper.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/GlowSquid.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/attributes/RangedAttribute.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ambient/Bat.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Ocelot.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Vindicator.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/raid/Raids.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BucketItem.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/crafting/Ingredient.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/DragonEggBlock.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/HayBlock.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/IceBlock.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/KelpBlock.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/LavaFluid.java.patch delete mode 100644 purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/WaterFluid.java.patch diff --git a/purpur-server/minecraft-patches/unapplied-sources/io/papermc/paper/entity/activation/ActivationRange.java.patch b/purpur-server/minecraft-patches/sources/io/papermc/paper/entity/activation/ActivationRange.java.patch similarity index 67% rename from purpur-server/minecraft-patches/unapplied-sources/io/papermc/paper/entity/activation/ActivationRange.java.patch rename to purpur-server/minecraft-patches/sources/io/papermc/paper/entity/activation/ActivationRange.java.patch index 8d0344f08..e0eadeef9 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/io/papermc/paper/entity/activation/ActivationRange.java.patch +++ b/purpur-server/minecraft-patches/sources/io/papermc/paper/entity/activation/ActivationRange.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java -index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..ca21597263cb430e2a5ae07e8cecfb0d53a270d2 100644 --- a/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java -@@ -147,6 +147,8 @@ public final class ActivationRange { +@@ -147,6 +_,8 @@ continue; } @@ -17,7 +9,7 @@ index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..ca21597263cb430e2a5ae07e8cecfb0d final int worldHeight = world.getHeight(); ActivationRange.maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange); ActivationType.MISC.boundingBox = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange); -@@ -288,6 +290,7 @@ public final class ActivationRange { +@@ -288,6 +_,7 @@ * @return */ public static boolean checkIfActive(final Entity entity) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/CrashReport.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch similarity index 66% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/CrashReport.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch index 1ee210bd8..736446dfb 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/CrashReport.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/CrashReport.java b/net/minecraft/CrashReport.java -index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..394443d00e661715439be1e56dddc129947699a4 100644 --- a/net/minecraft/CrashReport.java +++ b/net/minecraft/CrashReport.java -@@ -30,6 +30,7 @@ public class CrashReport { +@@ -30,6 +_,7 @@ private boolean trackingStackTrace = true; private StackTraceElement[] uncategorizedStackTrace = new StackTraceElement[0]; private final SystemReport systemReport = new SystemReport(); @@ -16,7 +8,7 @@ index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..394443d00e661715439be1e56dddc129 public CrashReport(String title, Throwable exception) { io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception); // Paper -@@ -130,7 +131,7 @@ public class CrashReport { +@@ -130,7 +_,7 @@ } public String getFriendlyReport(ReportType type) { @@ -24,8 +16,8 @@ index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..394443d00e661715439be1e56dddc129 + return this.getFriendlyReport(type, extraInfo); // Purpur - Rebrand } - @Nullable -@@ -161,7 +162,7 @@ public class CrashReport { + public @Nullable Path getSaveFile() { +@@ -160,7 +_,7 @@ } public boolean saveToFile(Path path, ReportType type) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/CommandSourceStack.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/commands/CommandSourceStack.java.patch similarity index 74% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/CommandSourceStack.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/commands/CommandSourceStack.java.patch index a4986b71a..a0a765803 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/CommandSourceStack.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/commands/CommandSourceStack.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java -index be42e2bd05a7468911698e53a33d87abf4a1080b..d3d967cd922a6e5129546cad9d8fa5565960f6a5 100644 --- a/net/minecraft/commands/CommandSourceStack.java +++ b/net/minecraft/commands/CommandSourceStack.java -@@ -447,6 +447,19 @@ public class CommandSourceStack implements ExecutionCommandSource io.papermc.paper.adventure.PaperAdventure.asVanilla(message), broadcastToOps); + } + // Purpur end - Purpur config files -+ + public void sendSuccess(Supplier messageSupplier, boolean allowLogging) { boolean flag = this.source.acceptsSuccess() && !this.silent; - boolean flag1 = allowLogging && this.source.shouldInformAdmins() && !this.silent; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/Commands.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/commands/Commands.java.patch similarity index 84% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/Commands.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/commands/Commands.java.patch index 8c32dba08..85a32af62 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/Commands.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/commands/Commands.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index 83f05b042630891d43cfb567e98666831df80f6e..9aa09e11032f539952edeeed119f7705c330db0a 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -255,11 +255,11 @@ public class Commands { +@@ -265,11 +_,11 @@ JfrCommand.register(this.dispatcher); } @@ -22,7 +14,7 @@ index 83f05b042630891d43cfb567e98666831df80f6e..9aa09e11032f539952edeeed119f7705 RaidCommand.register(this.dispatcher, context); DebugPathCommand.register(this.dispatcher); DebugMobSpawningCommand.register(this.dispatcher); -@@ -287,6 +287,14 @@ public class Commands { +@@ -297,6 +_,14 @@ StopCommand.register(this.dispatcher); TransferCommand.register(this.dispatcher); WhitelistCommand.register(this.dispatcher); @@ -37,7 +29,7 @@ index 83f05b042630891d43cfb567e98666831df80f6e..9aa09e11032f539952edeeed119f7705 } if (selection.includeIntegrated) { -@@ -511,6 +519,7 @@ public class Commands { +@@ -522,6 +_,7 @@ private void runSync(ServerPlayer player, java.util.Collection bukkit, RootCommandNode rootCommandNode) { // Paper end - Perf: Async command map building new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent(player.getBukkitEntity(), (RootCommandNode) rootCommandNode, true).callEvent(); // Paper - Brigadier API @@ -45,7 +37,7 @@ index 83f05b042630891d43cfb567e98666831df80f6e..9aa09e11032f539952edeeed119f7705 org.bukkit.event.player.PlayerCommandSendEvent event = new org.bukkit.event.player.PlayerCommandSendEvent(player.getBukkitEntity(), new java.util.LinkedHashSet<>(bukkit)); event.getPlayer().getServer().getPluginManager().callEvent(event); -@@ -521,6 +530,8 @@ public class Commands { +@@ -532,6 +_,8 @@ } } // CraftBukkit end diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch similarity index 85% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch index 28fa321ba..9c23cd46d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/commands/arguments/selector/EntitySelector.java b/net/minecraft/commands/arguments/selector/EntitySelector.java -index d438e31a082b675d7eb0eead7067a0b92363a9f9..a65ca0b1a44f8c993fad7f230a9c0b11a474e358 100644 --- a/net/minecraft/commands/arguments/selector/EntitySelector.java +++ b/net/minecraft/commands/arguments/selector/EntitySelector.java -@@ -193,26 +193,27 @@ public class EntitySelector { +@@ -190,26 +_,27 @@ this.checkPermissions(source); if (this.playerName != null) { ServerPlayer playerByName = source.getServer().getPlayerList().getPlayerByName(this.playerName); @@ -40,7 +32,7 @@ index d438e31a082b675d7eb0eead7067a0b92363a9f9..a65ca0b1a44f8c993fad7f230a9c0b11 players.add(serverPlayer1); if (players.size() >= resultLimit) { return players; -@@ -271,4 +272,10 @@ public class EntitySelector { +@@ -267,4 +_,10 @@ public static Component joinNames(List names) { return ComponentUtils.formatList(names, Entity::getDisplayName); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/BlockPos.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/core/BlockPos.java.patch similarity index 53% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/BlockPos.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/core/BlockPos.java.patch index d4f4d4dc9..0d1842e69 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/BlockPos.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/core/BlockPos.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/core/BlockPos.java b/net/minecraft/core/BlockPos.java -index 5083959b61ec88868c0ede65a46087608e22983a..0ae78eecdb6556ff85018d49af4c183da5276c2d 100644 --- a/net/minecraft/core/BlockPos.java +++ b/net/minecraft/core/BlockPos.java -@@ -64,6 +64,12 @@ public class BlockPos extends Vec3i { +@@ -61,6 +_,12 @@ public static final int MAX_HORIZONTAL_COORDINATE = 33554431; // Paper end - Optimize Bit Operations by inlining diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch index 78953db1c..533c3c88a 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/core/dispenser/DispenseItemBehavior.java b/net/minecraft/core/dispenser/DispenseItemBehavior.java -index ef72c5d1b6196582cadb87944f3416881f56c8df..5d0eb3893a0cca99ef53c2095b7b36a145dc15be 100644 --- a/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -746,5 +746,22 @@ public interface DispenseItemBehavior { +@@ -750,5 +_,22 @@ DispenserBlock.registerBehavior(Items.TNT_MINECART, new MinecartDispenseItemBehavior(EntityType.TNT_MINECART)); DispenserBlock.registerBehavior(Items.HOPPER_MINECART, new MinecartDispenseItemBehavior(EntityType.HOPPER_MINECART)); DispenserBlock.registerBehavior(Items.COMMAND_BLOCK_MINECART, new MinecartDispenseItemBehavior(EntityType.COMMAND_BLOCK_MINECART)); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch index 0a25645cd..9a2c1e083 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java -index e2d169b45f1dba6559ca337b07a110f79d3db504..727d04a442053f6d0c4df3e744554e2866fa38cd 100644 --- a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java -@@ -32,7 +32,7 @@ public class EquipmentDispenseItemBehavior extends DefaultDispenseItemBehavior { +@@ -32,7 +_,7 @@ return false; } else { LivingEntity livingEntity = entitiesOfClass.getFirst(); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/GameTestHelper.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/GameTestHelper.java.patch new file mode 100644 index 000000000..5a40e03dc --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/GameTestHelper.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/gametest/framework/GameTestHelper.java ++++ b/net/minecraft/gametest/framework/GameTestHelper.java +@@ -322,6 +_,8 @@ + return gameType; + } + ++ public void setAfk(final boolean afk) {} // Purpur - AFK API ++ + @Override + public boolean isClientAuthoritative() { + return false; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/gametest/framework/TestCommand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/TestCommand.java.patch similarity index 54% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/gametest/framework/TestCommand.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/TestCommand.java.patch index 0c7cced61..c9f48d7e7 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/gametest/framework/TestCommand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/TestCommand.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/gametest/framework/TestCommand.java b/net/minecraft/gametest/framework/TestCommand.java -index f2c97bb3c849dce59964d51633c47a982d1aa164..32338e6b2e5066b22111fab618a7205139a66536 100644 --- a/net/minecraft/gametest/framework/TestCommand.java +++ b/net/minecraft/gametest/framework/TestCommand.java -@@ -443,7 +443,7 @@ public class TestCommand { +@@ -443,7 +_,7 @@ ) ) ); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/network/Connection.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/network/Connection.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/network/Connection.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/network/Connection.java.patch index 53ac06f7a..2d95e190f 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/network/Connection.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/network/Connection.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java -index 14addbaf68b7ad80490187d12d9c9b00891e2ce1..35b6f8365f4568da7bc0f4e47c39cb3690292aaf 100644 --- a/net/minecraft/network/Connection.java +++ b/net/minecraft/network/Connection.java -@@ -578,11 +578,20 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -554,11 +_,20 @@ private static final int MAX_PER_TICK = io.papermc.paper.configuration.GlobalConfiguration.get().misc.maxJoinsPerTick; // Paper - Buffer joins to world private static int joinAttemptsThisTick; // Paper - Buffer joins to world private static int currTick; // Paper - Buffer joins to world diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/network/chat/SignedMessageChain.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/network/chat/SignedMessageChain.java.patch similarity index 68% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/network/chat/SignedMessageChain.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/network/chat/SignedMessageChain.java.patch index ad514280f..4d67b4695 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/network/chat/SignedMessageChain.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/network/chat/SignedMessageChain.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/network/chat/SignedMessageChain.java b/net/minecraft/network/chat/SignedMessageChain.java -index f6eed34b2fd72ab74cc9dc4b99ca184d512c0a66..a3e211edd348c0936757de33a74b9456248b3bd2 100644 --- a/net/minecraft/network/chat/SignedMessageChain.java +++ b/net/minecraft/network/chat/SignedMessageChain.java -@@ -45,7 +45,7 @@ public class SignedMessageChain { +@@ -44,7 +_,7 @@ SignedMessageLink signedMessageLink = SignedMessageChain.this.nextLink; if (signedMessageLink == null) { throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.CHAIN_BROKEN); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/Main.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch similarity index 75% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/Main.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch index a53608fa5..2b6f384e7 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/Main.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java -index 2de7072c8ccc005e514673bba494b64d42e95a15..42841fdc7e64311ba9217789a3dc758a351cf674 100644 --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java -@@ -107,6 +107,13 @@ public class Main { +@@ -105,6 +_,13 @@ JvmProfiler.INSTANCE.start(Environment.SERVER); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/MinecraftServer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch similarity index 81% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/MinecraftServer.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch index 015e20c65..7a8b46efe 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/MinecraftServer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index f63a5567a2e845de904c2dacfbb875049e3e0c65..9337f3fa2daa224d04499fd2bb0fef9c1283ba27 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -286,6 +286,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; // Paper - don't store the vanilla dispatcher -@@ -302,6 +303,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation @@ -25,7 +17,7 @@ index f63a5567a2e845de904c2dacfbb875049e3e0c65..9337f3fa2daa224d04499fd2bb0fef9c // Paper start - improve tick loop public final ca.spottedleaf.moonrise.common.time.TickData tickTimes1s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(1L)); public final ca.spottedleaf.moonrise.common.time.TickData tickTimes5s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(5L)); -@@ -371,6 +374,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop catchup) { - final long difference = ticksBehind - catchup; -@@ -1773,7 +1800,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java -index fdeca41d40705f28864ce4443d01cd872c9d51b0..10e5469df1800bcdfb3f8cb4045ee25a4bafc58c 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java -@@ -147,6 +147,7 @@ public class PlayerAdvancements { +@@ -146,6 +_,7 @@ AdvancementHolder advancementHolder = advancementManager.get(path); if (advancementHolder == null) { - if (!path.getNamespace().equals(ResourceLocation.DEFAULT_NAMESPACE)) return; // CraftBukkit + if (!path.getNamespace().equals(Identifier.DEFAULT_NAMESPACE)) return; // CraftBukkit + if (!org.purpurmc.purpur.PurpurConfig.loggerSuppressIgnoredAdvancementWarnings) // Purpur - Logger settings (suppressing pointless logs) LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", path, this.playerSavePath); } else { this.startProgress(advancementHolder, progress); -@@ -194,6 +195,7 @@ public class PlayerAdvancements { +@@ -193,6 +_,7 @@ advancement.value().display().ifPresent(displayInfo -> { // Paper start - Add Adventure message to PlayerAdvancementDoneEvent - if (event.message() != null && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) { + if (event.message() != null && this.player.level().getGameRules().get(GameRules.SHOW_ADVANCEMENT_MESSAGES)) { + if (org.purpurmc.purpur.PurpurConfig.advancementOnlyBroadcastToAffectedPlayer) this.player.sendMessage(message); else // Purpur - Configurable broadcast settings this.playerList.broadcastSystemMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.message()), false); // Paper end diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/EnchantCommand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/EnchantCommand.java.patch similarity index 75% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/EnchantCommand.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/commands/EnchantCommand.java.patch index 33a41f30f..6379c1d94 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/EnchantCommand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/EnchantCommand.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/commands/EnchantCommand.java b/net/minecraft/server/commands/EnchantCommand.java -index 6f4fcee9fdba2248227708fcced1ce0f40aff6af..13f1dbd0d09428e9e0a42f99d0553283e0065f6f 100644 --- a/net/minecraft/server/commands/EnchantCommand.java +++ b/net/minecraft/server/commands/EnchantCommand.java -@@ -70,7 +70,7 @@ public class EnchantCommand { +@@ -70,7 +_,7 @@ private static int enchant(CommandSourceStack source, Collection targets, Holder enchantment, int level) throws CommandSyntaxException { Enchantment enchantment1 = enchantment.value(); @@ -17,7 +9,7 @@ index 6f4fcee9fdba2248227708fcced1ce0f40aff6af..13f1dbd0d09428e9e0a42f99d0553283 throw ERROR_LEVEL_TOO_HIGH.create(level, enchantment1.getMaxLevel()); } else { int i = 0; -@@ -80,7 +80,7 @@ public class EnchantCommand { +@@ -80,7 +_,7 @@ ItemStack mainHandItem = livingEntity.getMainHandItem(); if (!mainHandItem.isEmpty()) { if (enchantment1.canEnchant(mainHandItem) diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/GameModeCommand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GameModeCommand.java.patch similarity index 69% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/GameModeCommand.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GameModeCommand.java.patch index ad2768000..4890d3ff6 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/GameModeCommand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GameModeCommand.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/commands/GameModeCommand.java b/net/minecraft/server/commands/GameModeCommand.java -index 99b9408a025a0edb054aa2db3b743df4498c4f97..b56d990b172db5be8633f1fb3d8aaef1f69390b8 100644 --- a/net/minecraft/server/commands/GameModeCommand.java +++ b/net/minecraft/server/commands/GameModeCommand.java -@@ -53,6 +53,18 @@ public class GameModeCommand { +@@ -53,6 +_,18 @@ } private static int setMode(CommandContext context, Collection players, GameType gameType) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/GiveCommand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/GiveCommand.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch index 4e9c538ec..e7a366475 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/commands/GiveCommand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/commands/GiveCommand.java b/net/minecraft/server/commands/GiveCommand.java -index 4f56cdcf658234b1ca92d38c3df3d31e9be34a15..945d7c0b31fe9ac029e518af92eebd6e8018a69f 100644 --- a/net/minecraft/server/commands/GiveCommand.java +++ b/net/minecraft/server/commands/GiveCommand.java -@@ -69,6 +69,7 @@ public class GiveCommand { +@@ -69,6 +_,7 @@ i1 -= min; ItemStack itemStack1 = item.createItemStack(min, false); boolean flag = serverPlayer.getInventory().add(itemStack1); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/dedicated/DedicatedServer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch similarity index 81% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/dedicated/DedicatedServer.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch index a5f2a3b04..8230e207e 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/dedicated/DedicatedServer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 354b48c88b113c4048e258f2402aad2647d3c364..e728611fc4148f88d5c4f964af6f17a7b7ee9581 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java -@@ -198,6 +198,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -195,6 +_,7 @@ public void run() { if (!org.bukkit.craftbukkit.Main.useConsole) return; // CraftBukkit // Paper start - Use TerminalConsoleAppender @@ -16,7 +8,7 @@ index 354b48c88b113c4048e258f2402aad2647d3c364..e728611fc4148f88d5c4f964af6f17a7 new com.destroystokyo.paper.console.PaperConsole(DedicatedServer.this).start(); /* BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8)); -@@ -276,6 +277,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -273,6 +_,15 @@ io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics @@ -32,7 +24,7 @@ index 354b48c88b113c4048e258f2402aad2647d3c364..e728611fc4148f88d5c4f964af6f17a7 com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now // this.worldData.setGameType(properties.gameMode.get()); // CraftBukkit - moved to world loading -@@ -318,6 +328,30 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -315,6 +_,30 @@ if (true) throw new IllegalStateException("Failed to bind to port", var11); // Paper - Propagate failed to bind to port error return false; } @@ -63,13 +55,13 @@ index 354b48c88b113c4048e258f2402aad2647d3c364..e728611fc4148f88d5c4f964af6f17a7 // CraftBukkit start this.server.loadPlugins(); -@@ -393,6 +427,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -389,6 +_,9 @@ + MinecraftServerStatistics.registerJmxMonitoring(this); LOGGER.info("JMX monitoring enabled"); } - ++ + org.purpurmc.purpur.task.BossBarTask.startAll(); // Purpur - Implement TPSBar + if (org.purpurmc.purpur.PurpurConfig.beeCountPayload) org.purpurmc.purpur.task.BeehiveTask.instance().register(); // Purpur - Give bee counts in beehives to Purpur clients -+ + this.notificationManager().serverStarted(); return true; - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch similarity index 61% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch index b0125f993..1a7ed8c07 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/dedicated/DedicatedServerProperties.java b/net/minecraft/server/dedicated/DedicatedServerProperties.java -index e352a29c4a45fd3f397d1cf4586c5f149b4ba0d0..a9cd61f0a7bde931e59f1496191f1f8d465aec5e 100644 --- a/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -55,6 +55,7 @@ public class DedicatedServerProperties extends Settings -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/gui/MinecraftServerGui.java b/net/minecraft/server/gui/MinecraftServerGui.java -index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b3788623900db41 100644 --- a/net/minecraft/server/gui/MinecraftServerGui.java +++ b/net/minecraft/server/gui/MinecraftServerGui.java -@@ -39,6 +39,11 @@ public class MinecraftServerGui extends JComponent { +@@ -39,6 +_,11 @@ private Thread logAppenderThread; private final Collection finalizers = Lists.newArrayList(); final AtomicBoolean isClosing = new AtomicBoolean(); @@ -20,7 +12,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 public static MinecraftServerGui showFrameFor(final DedicatedServer server) { try { -@@ -46,7 +51,7 @@ public class MinecraftServerGui extends JComponent { +@@ -46,7 +_,7 @@ } catch (Exception var3) { } @@ -29,7 +21,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 final MinecraftServerGui minecraftServerGui = new MinecraftServerGui(server); jFrame.setDefaultCloseOperation(2); jFrame.add(minecraftServerGui); -@@ -54,7 +59,7 @@ public class MinecraftServerGui extends JComponent { +@@ -54,7 +_,7 @@ jFrame.setLocationRelativeTo(null); jFrame.setVisible(true); // Paper start - Improve ServerGUI @@ -38,7 +30,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 try { jFrame.setIconImage(javax.imageio.ImageIO.read(java.util.Objects.requireNonNull(MinecraftServerGui.class.getClassLoader().getResourceAsStream("logo.png")))); } catch (java.io.IOException ignore) { -@@ -64,7 +69,7 @@ public class MinecraftServerGui extends JComponent { +@@ -64,7 +_,7 @@ @Override public void windowClosing(WindowEvent event) { if (!minecraftServerGui.isClosing.getAndSet(true)) { @@ -47,7 +39,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 server.halt(true); minecraftServerGui.runFinalizers(); } -@@ -112,7 +117,7 @@ public class MinecraftServerGui extends JComponent { +@@ -112,7 +_,7 @@ private JComponent buildChatPanel() { JPanel jPanel = new JPanel(new BorderLayout()); @@ -56,7 +48,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 JScrollPane jScrollPane = new JScrollPane(jTextArea, 22, 30); jTextArea.setEditable(false); jTextArea.setFont(MONOSPACED); -@@ -121,10 +126,43 @@ public class MinecraftServerGui extends JComponent { +@@ -121,10 +_,43 @@ String trimmed = jTextField.getText().trim(); if (!trimmed.isEmpty()) { this.server.handleConsoleInput(trimmed, this.server.createCommandSourceStack()); @@ -100,7 +92,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 jTextArea.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent event) { -@@ -159,7 +197,7 @@ public class MinecraftServerGui extends JComponent { +@@ -159,7 +_,7 @@ } private static final java.util.regex.Pattern ANSI = java.util.regex.Pattern.compile("\\e\\[[\\d;]*[^\\d;]"); // CraftBukkit // Paper @@ -109,7 +101,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(() -> this.print(textArea, scrollPane, line)); } else { -@@ -170,10 +208,11 @@ public class MinecraftServerGui extends JComponent { +@@ -170,16 +_,29 @@ flag = verticalScrollBar.getValue() + verticalScrollBar.getSize().getHeight() + MONOSPACED.getSize() * 4 > verticalScrollBar.getMaximum(); } @@ -123,10 +115,10 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 if (flag) { verticalScrollBar.setValue(Integer.MAX_VALUE); -@@ -181,6 +220,18 @@ public class MinecraftServerGui extends JComponent { + } } } - ++ + // Purpur start - GUI Improvements + public static class CommandHistory extends java.util.LinkedList { + @Override @@ -138,7 +130,6 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862 + } + } + // Purpur end - GUI Improvements -+ + // Paper start - Add onboarding message for initial server start private JComponent buildOnboardingPanel() { - String onboardingLink = "https://docs.papermc.io/paper/next-steps"; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/gui/StatsComponent.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/gui/StatsComponent.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/gui/StatsComponent.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/gui/StatsComponent.java.patch index 03705bb82..fb8ae8440 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/gui/StatsComponent.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/gui/StatsComponent.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/gui/StatsComponent.java b/net/minecraft/server/gui/StatsComponent.java -index 35fd539eb2bfe60ad17ab1e558a01273666acc54..103ff139dae918c991413ce9df61da3e22ee458a 100644 --- a/net/minecraft/server/gui/StatsComponent.java +++ b/net/minecraft/server/gui/StatsComponent.java -@@ -43,7 +43,7 @@ public class StatsComponent extends JComponent { +@@ -41,7 +_,7 @@ } this.msgs[0] = "Memory use: " + l / 1024L / 1024L + " mb (" + Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory() + "% free)"; this.msgs[1] = "Avg tick: " + DECIMAL_FORMAT.format((double)this.server.getAverageTickTimeNanos() / TimeUtil.NANOSECONDS_PER_MILLISECOND) + " ms"; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerLevel.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerLevel.java.patch similarity index 80% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerLevel.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerLevel.java.patch index c1c0e3c2e..92b489c01 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerLevel.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerLevel.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b8789c14bafd 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -212,6 +212,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -218,6 +_,8 @@ private final StructureManager structureManager; private final StructureCheck structureCheck; private final boolean tickTime; @@ -17,7 +9,7 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 private final RandomSequences randomSequences; final LevelDebugSynchronizers debugSynchronizers = new LevelDebugSynchronizers(this); -@@ -616,8 +618,25 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -622,8 +_,25 @@ // CraftBukkit end this.tickTime = tickTime; this.server = server; @@ -44,7 +36,7 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 ChunkGenerator chunkGenerator = levelStem.generator(); // CraftBukkit start this.serverLevelData.setWorld(this); -@@ -699,6 +718,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -709,6 +_,7 @@ this.chunkDataController = new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.ChunkDataController((ServerLevel)(Object)this, this.chunkTaskScheduler); // Paper end - rewrite chunk system this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit @@ -52,19 +44,19 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 } // Paper start -@@ -745,7 +765,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -760,7 +_,7 @@ } - int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); -- if (this.sleepStatus.areEnoughSleeping(_int) && this.sleepStatus.areEnoughDeepSleeping(_int, this.players)) { -+ if (this.purpurConfig.playersSkipNight && this.sleepStatus.areEnoughSleeping(_int) && this.sleepStatus.areEnoughDeepSleeping(_int, this.players)) { // Purpur - Config for skipping night + int i = this.getGameRules().get(GameRules.PLAYERS_SLEEPING_PERCENTAGE); +- if (this.sleepStatus.areEnoughSleeping(i) && this.sleepStatus.areEnoughDeepSleeping(i, this.players)) { ++ if (this.purpurConfig.playersSkipNight && this.sleepStatus.areEnoughSleeping(i) && this.sleepStatus.areEnoughDeepSleeping(i, this.players)) { // Purpur - Config for skipping night // Paper start - create time skip event - move up calculations final long newDayTime = this.levelData.getDayTime() + 24000L; org.bukkit.event.world.TimeSkipEvent event = new org.bukkit.event.world.TimeSkipEvent( -@@ -879,6 +899,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -895,6 +_,13 @@ this.serverLevelData.getScheduledEvents().tick(this.server, l); Profiler.get().pop(); - if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) { + if (this.getGameRules().get(GameRules.ADVANCE_TIME)) { + // Purpur start - Configurable daylight cycle + int incrementTicks = isBrightOutside() ? this.purpurConfig.daytimeTicks : this.purpurConfig.nighttimeTicks; + if (incrementTicks != 12000) { @@ -75,7 +67,7 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 this.setDayTime(this.levelData.getDayTime() + 1L); } } -@@ -886,6 +913,20 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -902,6 +_,20 @@ public void setDayTime(long time) { this.serverLevelData.setDayTime(time); @@ -95,8 +87,8 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 + // Purpur end - Configurable daylight cycle } - public void tickCustomSpawners(boolean spawnEnemies) { -@@ -990,9 +1031,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe + public long getDayCount() { +@@ -1010,9 +_,17 @@ && this.random.nextDouble() < currentDifficultyAt.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01) // Paper - Configurable spawn chances for skeleton horses && !this.getBlockState(blockPos.below()).is(BlockTags.LIGHTNING_RODS); if (flag) { @@ -116,10 +108,10 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 skeletonHorse.setAge(0); skeletonHorse.setPos(blockPos.getX(), blockPos.getY(), blockPos.getZ()); this.addFreshEntity(skeletonHorse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit -@@ -1027,9 +1076,35 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1047,9 +_,35 @@ if (blockState.is(Blocks.SNOW)) { int layersValue = blockState.getValue(SnowLayerBlock.LAYERS); - if (layersValue < Math.min(_int, 8)) { + if (layersValue < Math.min(i, 8)) { + // Purpur start - Smooth snow accumulation + boolean canSnow = true; + // Ensure snow doesn't get more than N layers taller than its neighbors @@ -152,19 +144,19 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 } } else { org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, heightmapPos, Blocks.SNOW.defaultBlockState(), 3, null); // CraftBukkit -@@ -1050,7 +1125,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1070,7 +_,7 @@ poiType -> poiType.is(PoiTypes.LIGHTNING_ROD), - pos1 -> pos1.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, pos1.getX(), pos1.getZ()) - 1, + blockPos -> blockPos.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, blockPos.getX(), blockPos.getZ()) - 1, pos, - 128, + org.purpurmc.purpur.PurpurConfig.lightningRodRange, // Purpur - Make lightning rod range configurable PoiManager.Occupancy.ANY ); - return optional.map(pos1 -> pos1.above(1)); -@@ -1099,8 +1174,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe - int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); + return optional.map(blockPos -> blockPos.above(1)); +@@ -1119,8 +_,26 @@ + int i = this.getGameRules().get(GameRules.PLAYERS_SLEEPING_PERCENTAGE); Component component; - if (this.sleepStatus.areEnoughSleeping(_int)) { + if (this.sleepStatus.areEnoughSleeping(i)) { + // Purpur start - Customizable sleeping actionbar messages + if (org.purpurmc.purpur.PurpurConfig.sleepSkippingNight.isBlank()) { + return; @@ -185,10 +177,10 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 + net.kyori.adventure.text.minimessage.tag.resolver.Placeholder.parsed("total", Integer.toString(this.sleepStatus.sleepersNeeded(_int))))); + } else + // Purpur end - Customizable sleeping actionbar messages - component = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(_int)); + component = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(i)); } -@@ -1237,6 +1330,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1275,6 +_,7 @@ @VisibleForTesting public void resetWeatherCycle() { // CraftBukkit start @@ -196,7 +188,7 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents // 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.... -@@ -1244,6 +1338,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1282,6 +_,7 @@ this.serverLevelData.setRainTime(0); } // CraftBukkit end @@ -204,16 +196,16 @@ index c0ed4e023b35a076b554fa387e9a2324166b2fae..a70c9f9343a5497392d804eb8014b878 this.serverLevelData.setThundering(false, org.bukkit.event.weather.ThunderChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents // CraftBukkit start // If we stop due to everyone sleeping we should reset the weather duration to some other random value. -@@ -1917,7 +2012,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1954,7 +_,7 @@ Explosion.BlockInteraction blockInteraction = switch (explosionInteraction) { case NONE -> Explosion.BlockInteraction.KEEP; - case BLOCK -> this.getDestroyType(GameRules.RULE_BLOCK_EXPLOSION_DROP_DECAY); -- case MOB -> this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) -+ case MOB -> ((source instanceof net.minecraft.world.entity.projectile.LargeFireball) ? this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING, this.purpurConfig.fireballsMobGriefingOverride) : this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) // Purpur - Add mobGriefing override to everything affected - ? this.getDestroyType(GameRules.RULE_MOB_EXPLOSION_DROP_DECAY) + case BLOCK -> this.getDestroyType(GameRules.BLOCK_EXPLOSION_DROP_DECAY); +- case MOB -> this.getGameRules().get(GameRules.MOB_GRIEFING) ++ case MOB -> ((source instanceof net.minecraft.world.entity.projectile.LargeFireball) ? this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING, this.purpurConfig.fireballsMobGriefingOverride) : this.getGameRules().get(GameRules.MOB_GRIEFING)) // Purpur - Add mobGriefing override to everything affected + ? this.getDestroyType(GameRules.MOB_EXPLOSION_DROP_DECAY) : Explosion.BlockInteraction.KEEP; - case TNT -> this.getDestroyType(GameRules.RULE_TNT_EXPLOSION_DROP_DECAY); -@@ -2794,7 +2889,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe + case TNT -> this.getDestroyType(GameRules.TNT_EXPLOSION_DROP_DECAY); +@@ -2846,7 +_,7 @@ // Spigot start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message // Paper start - Fix merchant inventory not closing on entity removal diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerPlayer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch similarity index 80% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerPlayer.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch index a84a97a52..13bc1999d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerPlayer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch @@ -1,24 +1,16 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7ed333419 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -443,6 +443,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -428,6 +_,9 @@ public boolean isRealPlayer; // Paper - public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent - public @Nullable org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event + public com.destroystokyo.paper.event.entity.@Nullable PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent + public org.bukkit.event.player.PlayerQuitEvent.@Nullable QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event + private boolean tpsBar = false; // Purpur - Implement TPSBar + private boolean compassBar = false; // Purpur - Add compass command + private boolean ramBar = false; // Purpur - Implement rambar commands // Paper start - rewrite chunk system private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader; -@@ -516,6 +519,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -501,6 +_,9 @@ this.respawnConfig = input.read("respawn", ServerPlayer.RespawnConfig.CODEC).orElse(null); this.spawnExtraParticlesOnFall = input.getBooleanOr("spawn_extra_particles_on_fall", false); this.raidOmenPosition = input.read("raid_omen_position", BlockPos.CODEC).orElse(null); @@ -28,7 +20,7 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 // Paper start - Expand PlayerGameModeChangeEvent this.loadGameTypes(input); } -@@ -557,6 +563,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -542,6 +_,9 @@ output.store("ShoulderEntityRight", CompoundTag.CODEC, this.getShoulderEntityRight()); } this.getBukkitEntity().setExtraData(output); // CraftBukkit @@ -38,7 +30,7 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 } private void saveParentVehicle(ValueOutput output) { -@@ -1186,6 +1195,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1178,6 +_,7 @@ // Paper - moved up to sendClientboundPlayerCombatKillPacket() sendClientboundPlayerCombatKillPacket(event.getShowDeathMessages(), deathScreenMessage); // Paper - Expand PlayerDeathEvent Team team = this.getTeam(); @@ -46,7 +38,7 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 if (team == null || team.getDeathMessageVisibility() == Team.Visibility.ALWAYS) { this.server.getPlayerList().broadcastSystemMessage(deathMessage, false); } else if (team.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) { -@@ -1293,6 +1303,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1285,6 +_,13 @@ if (this.isInvulnerableTo(level, damageSource)) { return false; } else { @@ -60,7 +52,7 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 Entity entity = damageSource.getEntity(); if (!( // Paper - split the if statement. If below statement is false, hurtServer would not have been evaluated. Return false. !(entity instanceof Player player && !this.canHarmPlayer(player)) -@@ -1546,6 +1563,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1539,6 +_,7 @@ profilerFiller.pop(); profilerFiller.push("placing"); @@ -68,21 +60,21 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 this.setServerLevel(level); this.connection.internalTeleport(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives()); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); -@@ -1647,7 +1665,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc - new AABB(vec3.x() - 8.0, vec3.y() - 5.0, vec3.z() - 8.0, vec3.x() + 8.0, vec3.y() + 5.0, vec3.z() + 8.0), - monster -> monster.isPreventingPlayerRest(this.level(), this) - ); -- if (!entitiesOfClass.isEmpty()) { -+ if (!this.level().purpurConfig.playerSleepNearMonsters && !entitiesOfClass.isEmpty()) { // Purpur - Config to ignore nearby mobs when sleeping - return Either.left(Player.BedSleepingProblem.NOT_SAFE); +@@ -1647,7 +_,7 @@ + new AABB(vec3.x() - 8.0, vec3.y() - 5.0, vec3.z() - 8.0, vec3.x() + 8.0, vec3.y() + 5.0, vec3.z() + 8.0), + monster -> monster.isPreventingPlayerRest(this.level(), this) + ); +- if (!entitiesOfClass.isEmpty()) { ++ if (!this.level().purpurConfig.playerSleepNearMonsters && !entitiesOfClass.isEmpty()) { // Purpur - Config to ignore nearby mobs when sleeping + return Either.left(Player.BedSleepingProblem.NOT_SAFE); + } } - } -@@ -1684,7 +1702,19 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc - CriteriaTriggers.SLEPT_IN_BED.trigger(this); - }); - if (!this.level().canSleepThroughNights()) { -- this.displayClientMessage(Component.translatable("sleep.not_possible"), true); -+ // Purpur start - Customizable sleeping actionbar messages +@@ -1687,8 +_,19 @@ + CriteriaTriggers.SLEPT_IN_BED.trigger(this); + }); + if (!this.level().canSleepThroughNights()) { +- this.displayClientMessage(Component.translatable("sleep.not_possible"), true); ++ // Purpur start - Customizable sleeping actionbar messages + Component clientMessage; + if (org.purpurmc.purpur.PurpurConfig.sleepNotPossible.isBlank()) { + clientMessage = null; @@ -90,15 +82,15 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 + clientMessage = io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(org.purpurmc.purpur.PurpurConfig.sleepNotPossible)); + } else { + clientMessage = Component.translatable("sleep.not_possible"); -+ } + } + if (clientMessage != null) { + this.displayClientMessage(clientMessage, true); -+ } -+ // Purpur end - Customizable sleeping actionbar messages - } ++ }// Purpur end - Customizable sleeping actionbar messages ++ } - this.level().updateSleepingPlayerList(); -@@ -1776,6 +1806,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + this.level().updateSleepingPlayerList(); + return either; +@@ -1779,6 +_,7 @@ @Override public void openTextEdit(SignBlockEntity signEntity, boolean isFrontText) { @@ -106,7 +98,7 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 this.connection.send(new ClientboundBlockUpdatePacket(this.level(), signEntity.getBlockPos())); this.connection.send(new ClientboundOpenSignEditorPacket(signEntity.getBlockPos(), isFrontText)); } -@@ -2085,6 +2116,26 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2116,6 +_,26 @@ this.lastSentExp = -1; // CraftBukkit - Added to reset } @@ -133,7 +125,7 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 @Override public void displayClientMessage(Component message, boolean overlay) { this.sendSystemMessage(message, overlay); -@@ -2319,6 +2370,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2350,6 +_,20 @@ ); } @@ -154,10 +146,11 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 public void sendSystemMessage(Component message) { this.sendSystemMessage(message, false); } -@@ -2457,7 +2522,67 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2487,7 +_,67 @@ public void resetLastActionTime() { this.lastActionTime = Util.getMillis(); +- } + this.setAfk(false); // Purpur - AFK API + } + @@ -217,12 +210,12 @@ index b4a996ac6c570e988b38237a32f90ec5042cbc17..d4b57465b7d49f8000de31f75c49f3f7 + @Override + public boolean canBeCollidedWith(Entity entity) { + return !this.isAfk() && super.canBeCollidedWith(entity); - } ++ } + // Purpur end - AFK API public ServerStatsCounter getStats() { return this.stats; -@@ -3098,4 +3223,65 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -3123,4 +_,65 @@ return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch similarity index 83% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch index d87d44941..0d1209682 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java -index 7166889bce8065508030ecd5b1400ee9be031bf3..fad600f343ee0983efc183f083b1507648987575 100644 --- a/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -368,6 +368,7 @@ public class ServerPlayerGameMode { +@@ -364,6 +_,7 @@ } return false; } @@ -16,7 +8,7 @@ index 7166889bce8065508030ecd5b1400ee9be031bf3..fad600f343ee0983efc183f083b15076 } // CraftBukkit end -@@ -485,6 +486,7 @@ public class ServerPlayerGameMode { +@@ -481,6 +_,7 @@ public InteractionHand interactHand; public ItemStack interactItemStack; public InteractionResult useItemOn(ServerPlayer player, Level level, ItemStack stack, InteractionHand hand, BlockHitResult hitResult) { @@ -24,7 +16,7 @@ index 7166889bce8065508030ecd5b1400ee9be031bf3..fad600f343ee0983efc183f083b15076 BlockPos blockPos = hitResult.getBlockPos(); BlockState blockState = level.getBlockState(blockPos); boolean cancelledBlock = false; -@@ -527,7 +529,7 @@ public class ServerPlayerGameMode { +@@ -523,7 +_,7 @@ boolean flag = !player.getMainHandItem().isEmpty() || !player.getOffhandItem().isEmpty(); boolean flag1 = player.isSecondaryUseActive() && flag; ItemStack itemStack = stack.copy(); @@ -33,7 +25,7 @@ index 7166889bce8065508030ecd5b1400ee9be031bf3..fad600f343ee0983efc183f083b15076 InteractionResult interactionResult = blockState.useItemOn(player.getItemInHand(hand), level, player, hand, hitResult); if (interactionResult.consumesAction()) { CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger(player, blockPos, itemStack); -@@ -573,4 +575,18 @@ public class ServerPlayerGameMode { +@@ -569,4 +_,18 @@ public void setLevel(ServerLevel level) { this.level = level; } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/WorldGenRegion.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch similarity index 50% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/WorldGenRegion.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch index 542db078b..a68b41c11 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/level/WorldGenRegion.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/level/WorldGenRegion.java b/net/minecraft/server/level/WorldGenRegion.java -index b8be39ae633e466d764f329f614620f1a2e1ef3f..75f3f8e033c1ef3ed6790dabaf9565b9f08d0ef2 100644 --- a/net/minecraft/server/level/WorldGenRegion.java +++ b/net/minecraft/server/level/WorldGenRegion.java -@@ -314,6 +314,7 @@ public class WorldGenRegion implements WorldGenLevel { +@@ -311,6 +_,7 @@ return true; } else { // Paper start - Buffer OOB setBlock calls diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch index a1cd2b14b..eb1276339 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index c6db2c96db96453daaf49779f588f75f7c3d3d60..e98400719a4ab43dc0ce90cdca19ba86e4849720 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -40,10 +40,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -40,10 +_,11 @@ public final Connection connection; // Paper private final boolean transferred; //private long keepAliveTime; // Paper - improve keepalives @@ -21,18 +13,18 @@ index c6db2c96db96453daaf49779f588f75f7c3d3d60..e98400719a4ab43dc0ce90cdca19ba86 private volatile int latency; // Paper - improve keepalives - make volatile private final io.papermc.paper.util.KeepAlive keepAlive; // Paper - improve keepalives private volatile boolean suspendFlushingOnServerThread = false; -@@ -54,6 +55,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -54,6 +_,10 @@ public final java.util.Map packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit - protected static final net.minecraft.resources.ResourceLocation MINECRAFT_BRAND = net.minecraft.resources.ResourceLocation.withDefaultNamespace("brand"); // Paper - Brand support + protected static final net.minecraft.resources.Identifier MINECRAFT_BRAND = net.minecraft.resources.Identifier.withDefaultNamespace("brand"); // Paper - Brand support + // Purpur start - Purpur client support -+ protected static final net.minecraft.resources.ResourceLocation PURPUR_CLIENT = net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("purpur", "client"); ++ protected static final net.minecraft.resources.Identifier PURPUR_CLIENT = net.minecraft.resources.Identifier.fromNamespaceAndPath("purpur", "client"); + public boolean purpurClient; + // Purpur end - Purpur client support // Paper start - retain certain values public @Nullable String playerBrand; public final java.util.Set pluginMessagerChannels; -@@ -105,6 +110,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -105,6 +_,18 @@ // Paper start - improve keepalives long now = System.nanoTime(); io.papermc.paper.util.KeepAlive.PendingKeepAlive pending = this.keepAlive.pendingKeepAlives.peek(); @@ -51,7 +43,7 @@ index c6db2c96db96453daaf49779f588f75f7c3d3d60..e98400719a4ab43dc0ce90cdca19ba86 if (pending != null && pending.challengeId() == packet.getId()) { this.keepAlive.pendingKeepAlives.remove(pending); -@@ -179,6 +196,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -179,6 +_,12 @@ return; } @@ -64,7 +56,7 @@ index c6db2c96db96453daaf49779f588f75f7c3d3d60..e98400719a4ab43dc0ce90cdca19ba86 if (identifier.equals(MINECRAFT_BRAND)) { this.playerBrand = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.wrappedBuffer(data)).readUtf(256); } -@@ -264,6 +287,23 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -264,6 +_,23 @@ Profiler.get().push("keepAlive"); long millis = Util.getMillis(); // Paper start - improve keepalives diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch similarity index 90% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch index ef15dc326..d5334ce6d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a79a1f5ba6 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -341,6 +341,20 @@ public class ServerGamePacketListenerImpl +@@ -346,6 +_,20 @@ } // Paper end - configuration phase API @@ -29,7 +21,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 @Override public void tick() { if (this.ackBlockChangesUpTo > -1) { -@@ -358,6 +372,12 @@ public class ServerGamePacketListenerImpl +@@ -363,6 +_,12 @@ && this.server.playerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > TimeUnit.MINUTES.toMillis(this.server.playerIdleTimeout()) && !this.player.wonGame) { @@ -42,7 +34,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause } } -@@ -672,6 +692,8 @@ public class ServerGamePacketListenerImpl +@@ -682,6 +_,8 @@ this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -51,7 +43,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 Location oldTo = to.clone(); PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); this.cserver.getPluginManager().callEvent(event); -@@ -751,6 +773,7 @@ public class ServerGamePacketListenerImpl +@@ -761,6 +_,7 @@ PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); if (packet.getId() == this.awaitingTeleport) { if (this.awaitingPositionFromClient == null) { @@ -59,7 +51,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause return; } -@@ -1284,6 +1307,10 @@ public class ServerGamePacketListenerImpl +@@ -1308,6 +_,10 @@ final int maxBookPageSize = pageMax.intValue(); final double multiplier = Math.clamp(io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier, 0.3D, 1D); long byteAllowed = maxBookPageSize; @@ -70,7 +62,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 for (final String page : pageList) { final int byteLength = page.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; byteTotal += byteLength; -@@ -1308,7 +1335,8 @@ public class ServerGamePacketListenerImpl +@@ -1332,7 +_,8 @@ } if (byteTotal > byteAllowed) { @@ -80,7 +72,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 this.disconnectAsync(Component.literal("Book too large!"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause // Paper - add proper async disconnect return; } -@@ -1327,31 +1355,45 @@ public class ServerGamePacketListenerImpl +@@ -1351,31 +_,45 @@ Optional optional = packet.title(); optional.ifPresent(list::add); list.addAll(packet.pages()); @@ -130,7 +122,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 itemStack.set( DataComponents.WRITTEN_BOOK_CONTENT, new WrittenBookContent(this.filterableFromOutgoing(title), this.player.getPlainTextName(), 0, list, true) ); -@@ -1364,6 +1406,16 @@ public class ServerGamePacketListenerImpl +@@ -1388,6 +_,16 @@ return this.player.isTextFilteringEnabled() ? Filterable.passThrough(filteredText.filteredOrEmpty()) : Filterable.from(filteredText); } @@ -147,7 +139,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 @Override public void handleEntityTagQuery(ServerboundEntityTagQueryPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); -@@ -1403,7 +1455,15 @@ public class ServerGamePacketListenerImpl +@@ -1427,7 +_,15 @@ @Override public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); @@ -164,7 +156,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause } else { ServerLevel serverLevel = this.player.level(); -@@ -1585,7 +1645,7 @@ public class ServerGamePacketListenerImpl +@@ -1610,7 +_,7 @@ movedWrongly = true; if (event.getLogWarning()) // Paper end @@ -173,7 +165,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 } // Paper } -@@ -1650,6 +1710,8 @@ public class ServerGamePacketListenerImpl +@@ -1675,6 +_,8 @@ this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -182,7 +174,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 Location oldTo = to.clone(); PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); this.cserver.getPluginManager().callEvent(event); -@@ -1705,6 +1767,13 @@ public class ServerGamePacketListenerImpl +@@ -1730,6 +_,13 @@ this.player.tryResetCurrentImpulseContext(); } @@ -196,7 +188,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 this.player.checkMovementStatistics(this.player.getX() - x, this.player.getY() - y, this.player.getZ() - z); this.lastGoodX = this.player.getX(); this.lastGoodY = this.player.getY(); -@@ -1722,6 +1791,17 @@ public class ServerGamePacketListenerImpl +@@ -1747,6 +_,17 @@ } } @@ -214,7 +206,7 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 private boolean shouldCheckPlayerMovement(boolean isElytraMovement) { if (this.isSingleplayerOwner()) { return false; -@@ -2121,6 +2201,7 @@ public class ServerGamePacketListenerImpl +@@ -2161,6 +_,7 @@ boolean cancelled; if (hitResult == null || hitResult.getType() != HitResult.Type.BLOCK) { @@ -222,20 +214,20 @@ index ef7d44ea1c1582bbf1d544819825778c414fe40d..caae7fc98d13ad92d17b6869b1fe86a7 org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemInHand, hand); cancelled = event.useItemInHand() == Event.Result.DENY; } else { -@@ -2768,6 +2849,7 @@ public class ServerGamePacketListenerImpl +@@ -2807,6 +_,7 @@ AABB boundingBox = target.getBoundingBox(); - if (this.player.canInteractWithEntity(boundingBox, io.papermc.paper.configuration.GlobalConfiguration.get().misc.clientInteractionLeniencyDistance.or(3.0))) { // Paper - configurable lenience value for interact range + if (packet.isWithinRange(this.player, boundingBox, io.papermc.paper.configuration.GlobalConfiguration.get().misc.clientInteractionLeniencyDistance.or(3.0))) { // Paper - configurable lenience value for interact range + if (target instanceof net.minecraft.world.entity.Mob mob) mob.ticksSinceLastInteraction = 0; // Purpur - Entity lifespan packet.dispatch( new ServerboundInteractPacket.Handler() { private void performInteraction(InteractionHand hand, ServerGamePacketListenerImpl.EntityInteraction entityInteraction, PlayerInteractEntityEvent event) { // CraftBukkit -@@ -3509,7 +3591,7 @@ public class ServerGamePacketListenerImpl +@@ -3552,7 +_,7 @@ @Override public void handleChangeGameMode(ServerboundChangeGameModePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); -- if (!this.player.hasPermissions(2)) { -+ if (!this.player.hasPermissions(2) && !player.getBukkitEntity().hasPermission("purpur.debug.f3n")) { // Purpur - Add permission for F3+N debug +- if (!GameModeCommand.PERMISSION_CHECK.check(this.player.permissions())) { ++ if (!GameModeCommand.PERMISSION_CHECK.check(this.player.permissions()) && !player.getBukkitEntity().hasPermission("purpur.debug.f3n")) { // Purpur - Add permission for F3+N debug LOGGER.warn( "Player {} tried to change game mode to {} without required permissions", this.player.getGameProfile().name(), diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch similarity index 70% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch index 3135f905c..ec161a6f4 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index c5d071c591c844b11667013131d1d3bae8e3bac6..ace65f36d6562988665c530dd3fdbfaa5d2e2071 100644 --- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -276,7 +276,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -278,7 +_,7 @@ ServerLoginPacketListenerImpl.LOGGER.warn("Failed to verify username but will let them in anyway!"); ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(string1)); // Spigot } else { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch similarity index 59% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch index 7bfc178b2..3fc9d014a 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/net/minecraft/server/network/ServerStatusPacketListenerImpl.java -index 465559113071a47e706f77a5b0996597ee986b3d..1b966dc52b067cd9d1fa9f500b692e3f75f1cc90 100644 --- a/net/minecraft/server/network/ServerStatusPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerStatusPacketListenerImpl.java -@@ -37,6 +37,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene +@@ -37,6 +_,7 @@ } else { this.hasRequestedStatus = true; // this.connection.send(new ClientboundStatusResponsePacket(this.status)); // Paper diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/players/PlayerList.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/players/PlayerList.java.patch similarity index 72% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/players/PlayerList.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/players/PlayerList.java.patch index 838ef2b91..ae323de2e 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/players/PlayerList.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/players/PlayerList.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index cc5d1e8007e2ea32605bd68d0a73683e8fb6886e..0c3451caa323ce2553c0d7ee00e7bf8cc8766b2c 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -305,6 +305,7 @@ public abstract class PlayerList { +@@ -311,6 +_,7 @@ scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); } // Paper end - Configurable player collision @@ -16,15 +8,15 @@ index cc5d1e8007e2ea32605bd68d0a73683e8fb6886e..0c3451caa323ce2553c0d7ee00e7bf8c // CraftBukkit start - moved down LOGGER.info( "{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", // CraftBukkit - add world name -@@ -425,6 +426,7 @@ public abstract class PlayerList { +@@ -431,6 +_,7 @@ } - public @Nullable net.kyori.adventure.text.Component remove(ServerPlayer player, net.kyori.adventure.text.Component leaveMessage) { + public net.kyori.adventure.text.@Nullable Component remove(ServerPlayer player, net.kyori.adventure.text.Component leaveMessage) { // Paper end - Fix kick event leave message not being sent + org.purpurmc.purpur.task.BossBarTask.removeFromAll(player.getBukkitEntity()); // Purpur - Implement TPSBar ServerLevel serverLevel = player.level(); player.awardStat(Stats.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it -@@ -764,6 +766,20 @@ public abstract class PlayerList { +@@ -770,6 +_,20 @@ } } @@ -45,23 +37,15 @@ index cc5d1e8007e2ea32605bd68d0a73683e8fb6886e..0c3451caa323ce2553c0d7ee00e7bf8c public void broadcastAll(Packet packet, ResourceKey dimension) { for (ServerPlayer serverPlayer : this.players) { if (serverPlayer.level().dimension() == dimension) { -@@ -852,12 +868,13 @@ public abstract class PlayerList { - if (player.connection != null) { - byte b; - if (permLevel <= 0) { -- b = 24; -+ b = EntityEvent.PERMISSION_LEVEL_ALL; // Purpur - Constants - } else if (permLevel >= 4) { -- b = 28; -+ b = EntityEvent.PERMISSION_LEVEL_OWNERS; // Purpur - Constants - } else { - b = (byte)(EntityEvent.PERMISSION_LEVEL_ALL + permLevel); - } +@@ -863,6 +_,7 @@ + case ADMINS -> EntityEvent.PERMISSION_LEVEL_ADMINS; + case OWNERS -> EntityEvent.PERMISSION_LEVEL_OWNERS; + }; + if (b < EntityEvent.PERMISSION_LEVEL_OWNERS && player.getBukkitEntity().hasPermission("purpur.debug.f3n")) b = EntityEvent.PERMISSION_LEVEL_OWNERS; // Purpur - Add permission for F3+N debug - player.connection.send(new ClientboundEntityEventPacket(player, b)); } -@@ -870,7 +887,7 @@ public abstract class PlayerList { + +@@ -874,7 +_,7 @@ // Paper start - whitelist verify event / login event public LoginResult canBypassFullServerLogin(final NameAndId nameAndId, final LoginResult currentResult) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/players/SleepStatus.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/players/SleepStatus.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/players/SleepStatus.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/server/players/SleepStatus.java.patch index 8200079c7..998d2f057 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/server/players/SleepStatus.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/players/SleepStatus.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/server/players/SleepStatus.java b/net/minecraft/server/players/SleepStatus.java -index 2a7ae521654ad5c9f392baa5562e64bb71b13097..3a3e6992563236141db687084aeec9684437a7db 100644 --- a/net/minecraft/server/players/SleepStatus.java +++ b/net/minecraft/server/players/SleepStatus.java -@@ -15,7 +15,7 @@ public class SleepStatus { +@@ -15,7 +_,7 @@ public boolean areEnoughDeepSleeping(int requiredSleepPercentage, List sleepingPlayers) { // CraftBukkit start @@ -17,7 +9,7 @@ index 2a7ae521654ad5c9f392baa5562e64bb71b13097..3a3e6992563236141db687084aeec968 boolean anyDeepSleep = sleepingPlayers.stream().anyMatch(Player::isSleepingLongEnough); return anyDeepSleep && i >= this.sleepersNeeded(requiredSleepPercentage); // CraftBukkit end -@@ -43,7 +43,7 @@ public class SleepStatus { +@@ -43,7 +_,7 @@ for (ServerPlayer serverPlayer : players) { if (!serverPlayer.isSpectator()) { this.activePlayers++; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/stats/ServerRecipeBook.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch similarity index 60% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/stats/ServerRecipeBook.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch index 114c8b02d..a9e87d51d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/stats/ServerRecipeBook.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/stats/ServerRecipeBook.java b/net/minecraft/stats/ServerRecipeBook.java -index 736a52c23da313bec6b25a9d1abf08816462403c..2f4f90bf428deb682fe9ec8c1218ae31ebaeea7c 100644 --- a/net/minecraft/stats/ServerRecipeBook.java +++ b/net/minecraft/stats/ServerRecipeBook.java -@@ -106,6 +106,7 @@ public class ServerRecipeBook extends RecipeBook { +@@ -106,6 +_,7 @@ private void loadRecipes(List>> recipes, Consumer>> output, Predicate>> isRecognized) { for (ResourceKey> resourceKey : recipes) { if (!isRecognized.test(resourceKey)) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/util/StringUtil.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/util/StringUtil.java.patch similarity index 52% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/util/StringUtil.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/util/StringUtil.java.patch index 73f110f95..b8d231182 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/util/StringUtil.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/util/StringUtil.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/util/StringUtil.java b/net/minecraft/util/StringUtil.java -index 62fdb8c215552a897c67dd97a302a86afee6d44f..3c5769e0f29d6b3295df568dc461ed521cb04378 100644 --- a/net/minecraft/util/StringUtil.java +++ b/net/minecraft/util/StringUtil.java -@@ -87,6 +87,7 @@ public class StringUtil { +@@ -87,6 +_,7 @@ // Paper start - Username validation public static boolean isReasonablePlayerName(final String name) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/CombatRules.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatRules.java.patch similarity index 69% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/CombatRules.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatRules.java.patch index a12663360..45e676e4b 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/CombatRules.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatRules.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/damagesource/CombatRules.java b/net/minecraft/world/damagesource/CombatRules.java -index 5f8637dfe4703cb78f486fe49d2e81518cf48715..d27215349f63e73198d23e107a6b634ddef8f7ca 100644 --- a/net/minecraft/world/damagesource/CombatRules.java +++ b/net/minecraft/world/damagesource/CombatRules.java -@@ -15,7 +15,7 @@ public class CombatRules { +@@ -15,7 +_,7 @@ public static float getDamageAfterAbsorb(LivingEntity entity, float damageAmount, DamageSource damageSource, float armorValue, float armorToughness) { float f = 2.0F + armorToughness / 4.0F; @@ -17,7 +9,7 @@ index 5f8637dfe4703cb78f486fe49d2e81518cf48715..d27215349f63e73198d23e107a6b634d float f2 = f1 / 25.0F; ItemStack weaponItem = damageSource.getWeaponItem(); float f3; -@@ -30,7 +30,7 @@ public class CombatRules { +@@ -30,7 +_,7 @@ } public static float getDamageAfterMagicAbsorb(float damageAmount, float enchantModifiers) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/CombatTracker.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatTracker.java.patch similarity index 79% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/CombatTracker.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatTracker.java.patch index 23dec2860..c39efefcb 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/CombatTracker.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatTracker.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/damagesource/CombatTracker.java b/net/minecraft/world/damagesource/CombatTracker.java -index 4cec197634fac341cca1ed108f1ecb0561f72461..aa6213ca382e4901363317df1e30332c5166f271 100644 --- a/net/minecraft/world/damagesource/CombatTracker.java +++ b/net/minecraft/world/damagesource/CombatTracker.java -@@ -64,7 +64,7 @@ public class CombatTracker { +@@ -64,7 +_,7 @@ private Component getMessageForAssistedFall(Entity entity, Component entityDisplayName, String hasWeaponTranslationKey, String noWeaponTranslationKey) { ItemStack itemStack = entity instanceof LivingEntity livingEntity ? livingEntity.getMainHandItem() : ItemStack.EMPTY; @@ -17,7 +9,7 @@ index 4cec197634fac341cca1ed108f1ecb0561f72461..aa6213ca382e4901363317df1e30332c ? Component.translatable(hasWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName, itemStack.getDisplayName()) : Component.translatable(noWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName); } -@@ -108,6 +108,15 @@ public class CombatTracker { +@@ -107,6 +_,15 @@ Component component = ComponentUtils.wrapInSquareBrackets(Component.translatable(string + ".link")).withStyle(INTENTIONAL_GAME_DESIGN_STYLE); return Component.translatable(string + ".message", this.mob.getDisplayName(), component); } else { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/DamageSource.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch similarity index 80% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/DamageSource.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch index a981b3c7f..f244d3350 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/DamageSource.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch @@ -1,23 +1,15 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/damagesource/DamageSource.java b/net/minecraft/world/damagesource/DamageSource.java -index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16953e8094 100644 --- a/net/minecraft/world/damagesource/DamageSource.java +++ b/net/minecraft/world/damagesource/DamageSource.java -@@ -30,6 +30,8 @@ public class DamageSource { - @Nullable - private org.bukkit.block.BlockState fromBlockSnapshot; // Captured block snapshot when the eventBlockDamager is not relevant (e.g. for bad respawn point explosions the block is already removed) +@@ -24,6 +_,8 @@ + private org.bukkit.block.@Nullable Block eventBlockDamager; // Relevant block set. damageSourcePosition is only used for bad respawn point explosion or custom damage + private org.bukkit.block.@Nullable BlockState fromBlockSnapshot; // Captured block snapshot when the eventBlockDamager is not relevant (e.g. for bad respawn point explosions the block is already removed) private boolean critical; // Supports arrows and sweeping damage + private boolean scissors = false; // Purpur - Dont run with scissors! + private boolean stonecutter = false; // Purpur - Stonecutter damage public DamageSource knownCause(final org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) { final DamageSource damageSource = this.copy(); -@@ -42,6 +44,30 @@ public class DamageSource { +@@ -35,6 +_,30 @@ return this.knownCause; } @@ -48,7 +40,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16 @Nullable public Entity eventEntityDamager() { return this.eventEntityDamager; -@@ -103,6 +129,8 @@ public class DamageSource { +@@ -94,6 +_,8 @@ damageSource.eventBlockDamager = this.eventBlockDamager; damageSource.fromBlockSnapshot = this.fromBlockSnapshot; damageSource.critical = this.critical; @@ -57,7 +49,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16 return damageSource; } // CraftBukkit end -@@ -169,12 +197,21 @@ public class DamageSource { +@@ -157,11 +_,20 @@ } else { Component component = this.causingEntity == null ? this.directEntity.getDisplayName() : this.causingEntity.getDisplayName(); ItemStack itemStack = this.causingEntity instanceof LivingEntity livingEntity1 ? livingEntity1.getMainHandItem() : ItemStack.EMPTY; @@ -67,7 +59,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16 : Component.translatable(string, livingEntity.getDisplayName(), component); } } - ++ + // Purpur start - Component related conveniences + public Component getLocalizedDeathMessage(String str, LivingEntity entity) { + net.kyori.adventure.text.Component name = io.papermc.paper.adventure.PaperAdventure.asAdventure(entity.getDisplayName()); @@ -76,7 +68,6 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16 + return io.papermc.paper.adventure.PaperAdventure.asVanilla(component); + } + // Purpur end - Component related conveniences -+ + public String getMsgId() { return this.type().msgId(); - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/DamageSources.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/DamageSources.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch index 5f40ccd7b..29006dbaf 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/damagesource/DamageSources.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/damagesource/DamageSources.java b/net/minecraft/world/damagesource/DamageSources.java -index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a7d4e5ebb 100644 --- a/net/minecraft/world/damagesource/DamageSources.java +++ b/net/minecraft/world/damagesource/DamageSources.java -@@ -42,6 +42,8 @@ public class DamageSources { +@@ -42,6 +_,8 @@ private final DamageSource stalagmite; private final DamageSource outsideBorder; private final DamageSource genericKill; @@ -17,7 +9,7 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a public DamageSources(RegistryAccess registry) { this.damageTypes = registry.lookupOrThrow(Registries.DAMAGE_TYPE); -@@ -70,6 +72,8 @@ public class DamageSources { +@@ -70,6 +_,8 @@ this.stalagmite = this.source(DamageTypes.STALAGMITE); this.outsideBorder = this.source(DamageTypes.OUTSIDE_BORDER); this.genericKill = this.source(DamageTypes.GENERIC_KILL); @@ -26,10 +18,11 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a } private DamageSource source(ResourceKey damageTypeKey) { -@@ -84,6 +88,18 @@ public class DamageSources { +@@ -83,6 +_,18 @@ + private DamageSource source(ResourceKey damageTypeKey, @Nullable Entity causingEntity, @Nullable Entity directEntity) { return new DamageSource(this.damageTypes.getOrThrow(damageTypeKey), causingEntity, directEntity); } - ++ + // Purpur start - Dont run with scissor + public DamageSource scissors() { + return this.scissors; @@ -41,7 +34,6 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a + return this.stonecutter; + } + // Purpur end - Stonecutter damage -+ + public DamageSource inFire() { return this.inFire; - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/HungerMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/HungerMobEffect.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch index 5e3467d05..ea284de7b 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/HungerMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/effect/HungerMobEffect.java b/net/minecraft/world/effect/HungerMobEffect.java -index 0890694ae96b6cd60079c34066e7a6e288f038e8..6c0e6bd2a171edc57dec71af178764454de73313 100644 --- a/net/minecraft/world/effect/HungerMobEffect.java +++ b/net/minecraft/world/effect/HungerMobEffect.java -@@ -12,7 +12,7 @@ class HungerMobEffect extends MobEffect { +@@ -12,7 +_,7 @@ @Override public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { if (entity instanceof Player player) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/PoisonMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/PoisonMobEffect.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch index a9651e9fb..0e8d7e3f7 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/PoisonMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/effect/PoisonMobEffect.java b/net/minecraft/world/effect/PoisonMobEffect.java -index 75327fd96858fd508ea63a6983e5cbc655a8800f..73cfc61ac3f8e33e6b9f4fd08a292266c0adb535 100644 --- a/net/minecraft/world/effect/PoisonMobEffect.java +++ b/net/minecraft/world/effect/PoisonMobEffect.java -@@ -12,8 +12,8 @@ public class PoisonMobEffect extends MobEffect { +@@ -12,8 +_,8 @@ @Override public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch similarity index 57% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch index 6ecb7f8a3..f19f319af 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/effect/RegenerationMobEffect.java b/net/minecraft/world/effect/RegenerationMobEffect.java -index 76cffa4d4d18d6c04749d941dbdf5eb60aed4095..81481267a1577721dcc405f39a4c350bd59ac9a2 100644 --- a/net/minecraft/world/effect/RegenerationMobEffect.java +++ b/net/minecraft/world/effect/RegenerationMobEffect.java -@@ -11,7 +11,7 @@ class RegenerationMobEffect extends MobEffect { +@@ -11,7 +_,7 @@ @Override public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { if (entity.getHealth() < entity.getMaxHealth()) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/SaturationMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch similarity index 67% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/SaturationMobEffect.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch index c50201d8c..f2d21d380 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/SaturationMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/effect/SaturationMobEffect.java b/net/minecraft/world/effect/SaturationMobEffect.java -index c192165910f6b139df6f604d0bce989061efa9cb..622c23f4570d07de8bee9623bf900aabb3331ded 100644 --- a/net/minecraft/world/effect/SaturationMobEffect.java +++ b/net/minecraft/world/effect/SaturationMobEffect.java -@@ -16,7 +16,8 @@ class SaturationMobEffect extends InstantenousMobEffect { +@@ -16,7 +_,8 @@ int oldFoodLevel = player.getFoodData().foodLevel; org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(player, amplifier + 1 + oldFoodLevel); if (!event.isCancelled()) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/WitherMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/WitherMobEffect.java.patch similarity index 51% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/WitherMobEffect.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/effect/WitherMobEffect.java.patch index 733c865ec..767637659 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/effect/WitherMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/WitherMobEffect.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/effect/WitherMobEffect.java b/net/minecraft/world/effect/WitherMobEffect.java -index 1fc9e1ad541c46124183a401b2a7d99aea69cecf..881271f0bc77a8a8a7d31daad9a8188bebaca67b 100644 --- a/net/minecraft/world/effect/WitherMobEffect.java +++ b/net/minecraft/world/effect/WitherMobEffect.java -@@ -12,7 +12,7 @@ public class WitherMobEffect extends MobEffect { +@@ -12,7 +_,7 @@ @Override public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/Entity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/Entity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch index 9aee6d0c4..80c17aeb8 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/Entity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch @@ -1,22 +1,14 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504291dc58c 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -150,6 +150,7 @@ import org.jetbrains.annotations.Contract; +@@ -153,6 +_,7 @@ import org.slf4j.Logger; - public abstract class Entity implements SyncedDataHolder, DebugValueSource, Nameable, ItemOwner, EntityAccess, ScoreHolder, DataComponentGetter, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker + public abstract class Entity implements SyncedDataHolder, DebugValueSource, Nameable, ItemOwner, SlotProvider, EntityAccess, ScoreHolder, DataComponentGetter, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker + public static javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); // Purpur - Configurable entity base attributes // CraftBukkit start private static final int CURRENT_LEVEL = 2; static boolean isLevelAtLeast(ValueInput input, int level) { -@@ -281,8 +282,9 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -282,8 +_,9 @@ public double xOld; public double yOld; public double zOld; @@ -27,8 +19,8 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 public int tickCount; private int remainingFireTicks; public boolean wasTouchingWater; -@@ -316,8 +318,8 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name - public PortalProcessor portalProcess; +@@ -316,8 +_,8 @@ + public @Nullable PortalProcessor portalProcess; public int portalCooldown; private boolean invulnerable; - protected UUID uuid = Mth.createInsecureUUID(this.random); @@ -38,7 +30,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 private boolean hasGlowingTag; private final Set tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); // Paper - fully limit tag size - replace set impl private final double[] pistonDeltas = new double[]{0.0, 0.0, 0.0}; -@@ -372,6 +374,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -373,6 +_,7 @@ public long activatedTick = Integer.MIN_VALUE; public boolean isTemporarilyActive; public long activatedImmunityTick = Integer.MIN_VALUE; @@ -46,7 +38,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 public void inactiveTick() { } -@@ -534,10 +537,21 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -535,10 +_,21 @@ } // Paper end - optimise entity tracker @@ -68,7 +60,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 this.position = Vec3.ZERO; this.blockPosition = BlockPos.ZERO; this.chunkPosition = ChunkPos.ZERO; -@@ -916,6 +930,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -931,6 +_,7 @@ && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { // Paper end - Configurable nether ceiling damage @@ -76,7 +68,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 this.onBelowWorld(); } } -@@ -1941,7 +1956,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -1956,7 +_,7 @@ } public boolean fireImmune() { @@ -85,7 +77,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 } public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) { -@@ -2634,6 +2649,11 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -2654,6 +_,11 @@ output.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -97,7 +89,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 } catch (Throwable var7) { CrashReport crashReport = CrashReport.forThrowable(var7, "Saving entity NBT"); CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being saved"); -@@ -2754,6 +2774,9 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -2774,6 +_,9 @@ } freezeLocked = input.getBooleanOr("Paper.FreezeLock", false); // Paper end @@ -107,7 +99,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 } catch (Throwable var7) { CrashReport crashReport = CrashReport.forThrowable(var7, "Loading entity NBT"); CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded"); -@@ -3026,6 +3049,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -3039,6 +_,7 @@ if (this.isAlive() && this instanceof Leashable leashable2) { if (leashable2.getLeashHolder() == player) { if (!this.level().isClientSide()) { @@ -115,7 +107,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 // Paper start - EntityUnleashEvent if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerUnleashEntityEvent( leashable2, player, hand, !player.hasInfiniteMaterials(), true -@@ -3450,15 +3474,18 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -3469,15 +_,18 @@ return Vec3.directionFromRotation(this.getRotationVector()); } @@ -135,7 +127,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 } } } -@@ -3663,7 +3690,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -3683,7 +_,7 @@ } public int getMaxAirSupply() { @@ -144,7 +136,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 } public int getAirSupply() { -@@ -4200,7 +4227,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -4218,7 +_,7 @@ } public boolean canUsePortal(boolean allowPassengers) { @@ -153,7 +145,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 } public boolean canTeleport(Level fromLevel, Level toLevel) { -@@ -4715,6 +4742,12 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -4737,6 +_,12 @@ return Mth.lerp(partialTick, this.yRotO, this.yRot); } @@ -166,7 +158,7 @@ index 8939cc4ab9612f132aec0a6d0175cc0d40de073e..96320494c8c738d86d33820c4acfb504 // Paper start - optimise collisions public boolean updateFluidHeightAndDoFluidPushing(final TagKey fluid, final double flowScale) { if (this.touchingUnloadedChunk()) { -@@ -5132,7 +5165,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name +@@ -5157,7 +_,7 @@ } public float maxUpStep() { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/EntitySelector.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/EntitySelector.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch index 1f7208817..ff1e039a1 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/EntitySelector.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/EntitySelector.java b/net/minecraft/world/entity/EntitySelector.java -index 67d95236e135c2b44845cfd5cbfb7e553b8e31f2..b94b3a5aabd44b0158d535c7a4dc006e6f6f4689 100644 --- a/net/minecraft/world/entity/EntitySelector.java +++ b/net/minecraft/world/entity/EntitySelector.java -@@ -28,6 +28,8 @@ public final class EntitySelector { +@@ -28,6 +_,8 @@ return net.minecraft.util.Mth.clamp(serverPlayer.getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= playerInsomniaTicks; }; // Paper end - Ability to control player's insomnia and phantoms diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/EntityType.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntityType.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/EntityType.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntityType.java.patch index c942a0387..f33120729 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/EntityType.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntityType.java.patch @@ -1,31 +1,23 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java -index 4af1d61a514c487b035f76ef4ae37536dc08ed67..d6f7d96dbdff908c91fbe43432313d2221b57afc 100644 --- a/net/minecraft/world/entity/EntityType.java +++ b/net/minecraft/world/entity/EntityType.java -@@ -1214,6 +1214,16 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -1240,6 +_,16 @@ return register(vanillaEntityId(key), builder); } + // Purpur start - PlayerSetSpawnerTypeWithEggEvent + public static EntityType getFromBukkitType(org.bukkit.entity.EntityType bukkitType) { -+ return getFromKey(ResourceLocation.parse(bukkitType.getKey().toString())); ++ return getFromKey(Identifier.parse(bukkitType.getKey().toString())); + } + -+ public static EntityType getFromKey(ResourceLocation location) { ++ public static EntityType getFromKey(Identifier location) { + return BuiltInRegistries.ENTITY_TYPE.getValue(location); + } + // Purpur end - PlayerSetSpawnerTypeWithEggEvent + - public static ResourceLocation getKey(EntityType entityType) { + public static Identifier getKey(EntityType entityType) { return BuiltInRegistries.ENTITY_TYPE.getKey(entityType); } -@@ -1445,6 +1455,16 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -1467,6 +_,16 @@ return this.category; } @@ -42,7 +34,7 @@ index 4af1d61a514c487b035f76ef4ae37536dc08ed67..d6f7d96dbdff908c91fbe43432313d22 public String getDescriptionId() { return this.descriptionId; } -@@ -1507,6 +1527,7 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -1528,6 +_,7 @@ // Paper start - Add logging for debugging entity tags with invalid ids () -> { LOGGER.warn("Skipping Entity with id {}", input.getStringOr("id", "[invalid]")); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ExperienceOrb.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ExperienceOrb.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch index f72ac4d88..76b98442d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ExperienceOrb.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java -index 85c5a8497ee45de232a87c3f152e7ca67c1821ee..189488367329df837f4a98cda5af2c80d8847b96 100644 --- a/net/minecraft/world/entity/ExperienceOrb.java +++ b/net/minecraft/world/entity/ExperienceOrb.java -@@ -358,7 +358,7 @@ public class ExperienceOrb extends Entity { +@@ -355,7 +_,7 @@ public void playerTouch(Player entity) { if (entity instanceof ServerPlayer serverPlayer) { if (entity.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(serverPlayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent @@ -17,7 +9,7 @@ index 85c5a8497ee45de232a87c3f152e7ca67c1821ee..189488367329df837f4a98cda5af2c80 entity.take(this, 1); int i = this.repairPlayerItems(serverPlayer, this.getValue()); if (i > 0) { -@@ -374,7 +374,7 @@ public class ExperienceOrb extends Entity { +@@ -371,7 +_,7 @@ } private int repairPlayerItems(ServerPlayer player, int value) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/LivingEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch similarity index 83% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/LivingEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch index 1883e92ac..359006756 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/LivingEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb385f1688 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -447,6 +447,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -447,6 +_,12 @@ if (d < 0.0) { double damagePerBlock = serverLevel1.getWorldBorder().getDamagePerBlock(); if (damagePerBlock > 0.0) { @@ -21,16 +13,16 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb this.hurtServer(serverLevel1, this.damageSources().outOfBorder(), Math.max(1, Mth.floor(-d * damagePerBlock))); } } -@@ -462,7 +468,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -462,7 +_,7 @@ if (this.shouldTakeDrowningDamage()) { this.setAirSupply(0); serverLevel1.broadcastEntityEvent(this, EntityEvent.DROWN_PARTICLES); - this.hurtServer(serverLevel1, this.damageSources().drown(), 2.0F); + this.hurtServer(serverLevel1, this.damageSources().drown(), (float) this.level().purpurConfig.damageFromDrowning); // Purpur - Drowning Settings } - } else if (this.getAirSupply() < this.getMaxAirSupply()) { + } else if (this.getAirSupply() < this.getMaxAirSupply() && MobEffectUtil.shouldEffectsRefillAirsupply(this)) { this.setAirSupply(this.increaseAirSupply(this.getAirSupply())); -@@ -522,7 +528,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -522,7 +_,7 @@ } protected boolean shouldTakeDrowningDamage() { @@ -39,7 +31,7 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb } @Override -@@ -1046,15 +1052,33 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -1050,14 +_,32 @@ if (lookingEntity != null) { ItemStack itemBySlot = this.getItemBySlot(EquipmentSlot.HEAD); EntityType type = lookingEntity.getType(); @@ -49,13 +41,15 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb - || type == EntityType.PIGLIN_BRUTE && itemBySlot.is(Items.PIGLIN_HEAD) - || type == EntityType.CREEPER && itemBySlot.is(Items.CREEPER_HEAD)) { - d *= 0.5; +- } +- } + // Purpur start - Mob head visibility percent + if (type == EntityType.SKELETON && itemBySlot.is(Items.SKELETON_SKULL)) { + d *= lookingEntity.level().purpurConfig.skeletonHeadVisibilityPercent; + } + else if (type == EntityType.ZOMBIE && itemBySlot.is(Items.ZOMBIE_HEAD)) { + d *= lookingEntity.level().purpurConfig.zombieHeadVisibilityPercent; - } ++ } + else if ((type == EntityType.PIGLIN || type == EntityType.PIGLIN_BRUTE) && itemBySlot.is(Items.PIGLIN_HEAD)) { + d *= lookingEntity.level().purpurConfig.piglinHeadVisibilityPercent; + } @@ -63,8 +57,8 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb + d *= lookingEntity.level().purpurConfig.creeperHeadVisibilityPercent; + } + // Purpur end - Mob head visibility percent - } - ++ } ++ + // Purpur start - Configurable mob blindness + if (lookingEntity instanceof LivingEntity entityliving) { + if (entityliving.hasEffect(MobEffects.BLINDNESS)) { @@ -75,11 +69,10 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb + } + } + // Purpur end - Configurable mob blindness -+ + return d; } - -@@ -1100,6 +1124,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -1104,6 +_,7 @@ Iterator iterator = this.activeEffects.values().iterator(); while (iterator.hasNext()) { MobEffectInstance effect = iterator.next(); @@ -87,7 +80,7 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED); if (event.isCancelled()) { continue; -@@ -1424,6 +1449,24 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -1424,6 +_,24 @@ this.stopSleeping(); } @@ -112,8 +105,8 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb this.noActionTime = 0; if (amount < 0.0F) { amount = 0.0F; -@@ -1686,10 +1729,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin - protected Player resolvePlayerResponsibleForDamage(DamageSource damageSource) { +@@ -1685,10 +_,10 @@ + protected @Nullable Player resolvePlayerResponsibleForDamage(DamageSource damageSource) { Entity entity = damageSource.getEntity(); if (entity instanceof Player player) { - this.setLastHurtByPlayer(player, 100); @@ -125,10 +118,22 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb } else { this.lastHurtByPlayer = null; this.lastHurtByPlayerMemoryTime = 0; -@@ -1740,6 +1783,18 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -1739,6 +_,30 @@ } } ++ // Purpur start - Totems work in inventory ++ if (level().purpurConfig.totemOfUndyingWorksInInventory && this instanceof ServerPlayer player && (itemStack == null || itemStack.getItem() != Items.TOTEM_OF_UNDYING) && player.getBukkitEntity().hasPermission("purpur.inventory_totem")) { ++ for (ItemStack item : player.getInventory().getNonEquipmentItems()) { ++ if (item.getItem() == Items.TOTEM_OF_UNDYING) { ++ itemInHand = item; ++ itemStack = item.copy(); ++ break; ++ } ++ } ++ } ++ // Purpur end - Totems work in inventory ++ + // Purpur start - Totems work in inventory + if (level().purpurConfig.totemOfUndyingWorksInInventory && this instanceof ServerPlayer player && (itemStack == null || itemStack.getItem() != Items.TOTEM_OF_UNDYING) && player.getBukkitEntity().hasPermission("purpur.inventory_totem")) { + for (ItemStack item : player.getInventory().getNonEquipmentItems()) { @@ -144,7 +149,7 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb final org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null; final EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot); event.setCancelled(itemStack == null); -@@ -1921,6 +1976,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -1920,6 +_,7 @@ boolean flag = this.lastHurtByPlayerMemoryTime > 0; this.dropEquipment(level); // CraftBukkit - from below if (this.shouldDropLoot(level)) { @@ -152,7 +157,7 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb this.dropFromLootTable(level, damageSource, flag); // Paper start final boolean prev = this.clearEquipmentSlots; -@@ -1929,6 +1985,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -1928,6 +_,7 @@ // Paper end this.dropCustomDeathLoot(level, damageSource, flag); this.clearEquipmentSlots = prev; // Paper @@ -160,7 +165,7 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb } // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment -@@ -3149,6 +3206,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -3202,6 +_,7 @@ float f = (float)(d * 10.0 - 3.0); if (f > 0.0F) { this.playSound(this.getFallDamageSound((int)f), 1.0F, 1.0F); @@ -168,16 +173,16 @@ index 6fa946c4ff8e1499a421e50d7e246bb669341d97..679073e7cd4e96a018b9bc6598b2c6fb this.hurt(this.damageSources().flyIntoWall(), f); } } -@@ -4549,6 +4607,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -4671,6 +_,12 @@ + ? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND) : slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType()); } - ++ + // Purpur start - Dispenser curse of binding protection + public @Nullable EquipmentSlot getEquipmentSlotForDispenserItem(ItemStack itemstack) { + return EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.BINDING_CURSE, itemstack) > 0 ? null : this.getEquipmentSlotForItem(itemstack); + } + // Purpur end - Dispenser curse of binding protection -+ + private static SlotAccess createEquipmentSlotAccess(LivingEntity entity, EquipmentSlot slot) { return slot != EquipmentSlot.HEAD && slot != EquipmentSlot.MAINHAND && slot != EquipmentSlot.OFFHAND - ? SlotAccess.forEquipmentSlot(entity, slot, itemStack -> itemStack.isEmpty() || entity.getEquipmentSlotForItem(itemStack) == slot) diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/Mob.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Mob.java.patch similarity index 72% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/Mob.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Mob.java.patch index b56ef8520..35009fa56 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/Mob.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Mob.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index f2a321d94ddc9247a3820d42f4a04290ea3ce6f6..7d98c5aaf29d2204ed43f221f95913ac749419db 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -150,6 +150,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -150,6 +_,7 @@ private int homeRadius = -1; public boolean aware = true; // CraftBukkit public net.kyori.adventure.util.TriState despawnInPeacefulOverride = net.kyori.adventure.util.TriState.NOT_SET; // Paper - allow changing despawnInPeaceful @@ -16,7 +8,7 @@ index f2a321d94ddc9247a3820d42f4a04290ea3ce6f6..7d98c5aaf29d2204ed43f221f95913ac protected Mob(EntityType type, Level level) { super(type, level); -@@ -295,6 +296,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -292,6 +_,7 @@ target = null; } } @@ -24,13 +16,14 @@ index f2a321d94ddc9247a3820d42f4a04290ea3ce6f6..7d98c5aaf29d2204ed43f221f95913ac this.target = target; return true; // CraftBukkit end -@@ -338,8 +340,28 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -335,7 +_,27 @@ } profilerFiller.pop(); +- } + incrementTicksSinceLastInteraction(); // Purpur - Entity lifespan - } - ++ } ++ + // Purpur start - Entity lifespan + private void incrementTicksSinceLastInteraction() { + ++this.ticksSinceLastInteraction; @@ -49,11 +42,10 @@ index f2a321d94ddc9247a3820d42f4a04290ea3ce6f6..7d98c5aaf29d2204ed43f221f95913ac + } + } + // Purpur end - Entity lifespan -+ + @Override protected void playHurtSound(DamageSource damageSource) { - this.resetAmbientSoundTime(); -@@ -443,6 +465,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -439,6 +_,7 @@ output.putString("Paper.DespawnInPeacefulOverride", this.despawnInPeacefulOverride.name()); } // Paper end - allow changing despawnInPeaceful @@ -61,7 +53,7 @@ index f2a321d94ddc9247a3820d42f4a04290ea3ce6f6..7d98c5aaf29d2204ed43f221f95913ac } @Override -@@ -470,6 +493,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -466,6 +_,7 @@ this.lootTableSeed = input.getLongOr("DeathLootTableSeed", 0L); this.setNoAi(input.getBooleanOr("NoAI", false)); this.aware = input.getBooleanOr("Bukkit.Aware", true); // CraftBukkit @@ -69,7 +61,7 @@ index f2a321d94ddc9247a3820d42f4a04290ea3ce6f6..7d98c5aaf29d2204ed43f221f95913ac // Paper start - allow changing despawnInPeaceful this.despawnInPeacefulOverride = readDespawnInPeacefulOverride(input); } -@@ -1210,7 +1234,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1246,7 +_,7 @@ ); } @@ -78,10 +70,10 @@ index f2a321d94ddc9247a3820d42f4a04290ea3ce6f6..7d98c5aaf29d2204ed43f221f95913ac return spawnGroupData; } -@@ -1557,6 +1581,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab - this.playAttackSound(); +@@ -1597,6 +_,7 @@ } + this.lungeForwardMaybe(); + if (target instanceof net.minecraft.server.level.ServerPlayer) this.ticksSinceLastInteraction = 0; // Purpur - Entity lifespan return flag; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/attributes/RangedAttribute.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/attributes/RangedAttribute.java.patch new file mode 100644 index 000000000..4cd99d012 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/attributes/RangedAttribute.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java ++++ b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java +@@ -29,6 +_,7 @@ + + @Override + public double sanitizeValue(double value) { ++ if (!org.purpurmc.purpur.PurpurConfig.clampAttributes) return Double.isNaN(value) ? this.minValue : value; // Purpur - Add attribute clamping and armor limit config + return Double.isNaN(value) ? this.minValue : Mth.clamp(value, this.minValue, this.maxValue); + } + } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch index 79674b0cf..f499d70f9 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -index ffc960a4e66ed03a358b363a4ce1dcee0b29ac36..21046cde1bd1ede8e7851eb4ea414e33628aa4a9 100644 --- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -@@ -85,7 +85,7 @@ public class AcquirePoi { +@@ -85,7 +_,7 @@ }; // Paper start - optimise POI access final java.util.List, BlockPos>> poiposes = new java.util.ArrayList<>(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch similarity index 80% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch index 41381f246..f90e63ebd 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java -index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6cb454c780 100644 --- a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java +++ b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java -@@ -55,7 +55,7 @@ public class InteractWithDoor { +@@ -55,7 +_,7 @@ Node nextNode = path.getNextNode(); BlockPos blockPos = previousNode.asBlockPos(); BlockState blockState = level.getBlockState(blockPos); @@ -17,7 +9,7 @@ index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6c DoorBlock doorBlock = (DoorBlock)blockState.getBlock(); if (!doorBlock.isOpen(blockState)) { // CraftBukkit start - entities opening doors -@@ -72,7 +72,7 @@ public class InteractWithDoor { +@@ -72,7 +_,7 @@ BlockPos blockPos1 = nextNode.asBlockPos(); BlockState blockState1 = level.getBlockState(blockPos1); @@ -26,7 +18,7 @@ index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6c DoorBlock doorBlock1 = (DoorBlock)blockState1.getBlock(); if (!doorBlock1.isOpen(blockState1)) { // CraftBukkit start - entities opening doors -@@ -118,7 +118,7 @@ public class InteractWithDoor { +@@ -118,7 +_,7 @@ iterator.remove(); } else { BlockState blockState = level.getBlockState(blockPos); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java.patch similarity index 52% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java.patch index 821662a32..694422e8b 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java b/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java -index 400e6d49144b3e5803901938dcd2ac4e52e9c131..45c45afeffcfba3558bdf46cbe39ff60004ffc01 100644 --- a/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java +++ b/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java -@@ -46,6 +46,7 @@ public class ShowTradesToPlayer extends Behavior { +@@ -45,6 +_,7 @@ @Override public boolean canStillUse(ServerLevel level, Villager entity, long gameTime) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java.patch index 935cfc81d..71a67946b 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java b/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java -index 6d815c3c28b76b1001ad197c6bb1f64620bb32fe..1408aaad39eb72996ea9e3ad6de217407e63d204 100644 --- a/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java +++ b/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java -@@ -287,7 +287,7 @@ public class TransportItemsBetweenContainers extends Behavior { +@@ -285,7 +_,7 @@ LevelChunk chunkNow = level.getChunkSource().getChunkNow(chunkPos.x, chunkPos.z); if (chunkNow != null) { for (BlockEntity blockEntity : chunkNow.getBlockEntities().values()) { @@ -17,7 +9,7 @@ index 6d815c3c28b76b1001ad197c6bb1f64620bb32fe..1408aaad39eb72996ea9e3ad6de21740 double d1 = chestBlockEntity.getBlockPos().distToCenterSqr(mob.position()); if (d1 < d) { TransportItemsBetweenContainers.TransportItemTarget transportItemTarget1 = this.isTargetValidToPick( -@@ -372,7 +372,11 @@ public class TransportItemsBetweenContainers extends Behavior { +@@ -369,7 +_,11 @@ } private boolean isTargetBlocked(Level level, TransportItemsBetweenContainers.TransportItemTarget target) { @@ -30,7 +22,7 @@ index 6d815c3c28b76b1001ad197c6bb1f64620bb32fe..1408aaad39eb72996ea9e3ad6de21740 } private boolean targetHasNotChanged(Level level, TransportItemsBetweenContainers.TransportItemTarget target) { -@@ -449,7 +453,7 @@ public class TransportItemsBetweenContainers extends Behavior { +@@ -446,7 +_,7 @@ } private boolean isWantedBlock(PathfinderMob mob, BlockState state) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java.patch index d7ad080be..6fbb7bf98 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java b/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java -index 6eaf0bd944349cd0c6084462ac385fa2caafe933..be59d0c27a83b329ec3f97c029cfb9c114e22472 100644 --- a/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java +++ b/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java -@@ -22,6 +22,7 @@ public class LlamaFollowCaravanGoal extends Goal { +@@ -22,6 +_,7 @@ @Override public boolean canUse() { @@ -16,7 +8,7 @@ index 6eaf0bd944349cd0c6084462ac385fa2caafe933..be59d0c27a83b329ec3f97c029cfb9c1 if (!this.llama.isLeashed() && !this.llama.inCaravan()) { List entities = this.llama.level().getEntities(this.llama, this.llama.getBoundingBox().inflate(9.0, 4.0, 9.0), entity1 -> { EntityType type = entity1.getType(); -@@ -71,6 +72,7 @@ public class LlamaFollowCaravanGoal extends Goal { +@@ -71,6 +_,7 @@ @Override public boolean canContinueToUse() { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java.patch similarity index 53% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java.patch index 34796860d..f623c03a9 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java -index 722f378bb3726200b6fe88948bf1e1d3514a7b5c..e337e22c2cf82b0c1cab3fe0a9ff894c0c718716 100644 --- a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java +++ b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java -@@ -116,9 +116,9 @@ public class RangedBowAttackGoal extends Go +@@ -116,9 +_,9 @@ } this.mob.lookAt(target, 30.0F, 30.0F); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch index 5802987ca..dbec726c4 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java -index ffa69c974320279ec31b17e66bfab52c3e194e1b..800f8eb0066a83324abac5998848f99f7e45529d 100644 --- a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java +++ b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java -@@ -59,7 +59,7 @@ public class RunAroundLikeCrazyGoal extends Goal { +@@ -59,7 +_,7 @@ if (firstPassenger instanceof Player player) { int temper = this.horse.getTemper(); int maxTemper = this.horse.getMaxTemper(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/SwellGoal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/SwellGoal.java.patch similarity index 66% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/SwellGoal.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/SwellGoal.java.patch index b460e31db..6600c8fdd 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/goal/SwellGoal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/goal/SwellGoal.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/goal/SwellGoal.java b/net/minecraft/world/entity/ai/goal/SwellGoal.java -index 243a552f6f0c8c2bd25c0209c95e3bca08734711..38fd0196a0f5a90e39fa4eb8592f89bf6b88ccf5 100644 --- a/net/minecraft/world/entity/ai/goal/SwellGoal.java +++ b/net/minecraft/world/entity/ai/goal/SwellGoal.java -@@ -55,6 +55,14 @@ public class SwellGoal extends Goal { +@@ -54,6 +_,14 @@ this.creeper.setSwellDir(-1); } else { this.creeper.setSwellDir(1); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java.patch similarity index 68% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java.patch index b6cf53485..7e2366a32 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java b/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java -index 066faa704338c573472381e1ebd063e0d52aaaa4..1f96fd5085bacb4c584576c7cb9f51e7898e9b03 100644 --- a/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java +++ b/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java -@@ -56,7 +56,7 @@ public class NearestBedSensor extends Sensor { +@@ -56,7 +_,7 @@ // Paper start - optimise POI access java.util.List, BlockPos>> poiposes = new java.util.ArrayList<>(); // don't ask me why it's unbounded. ask mojang. diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/targeting/TargetingConditions.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/targeting/TargetingConditions.java.patch similarity index 59% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/targeting/TargetingConditions.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/targeting/TargetingConditions.java.patch index ca1f45424..f090e4c9a 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/targeting/TargetingConditions.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ai/targeting/TargetingConditions.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java -index 8e536b1029b1e8f134c316f49df5d76d154d125a..95ad69396d740fbd1b990c6a1382a6e22065dea4 100644 --- a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java +++ b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java -@@ -64,6 +64,10 @@ public class TargetingConditions { +@@ -63,6 +_,10 @@ return false; } else if (this.selector != null && !this.selector.test(target, level)) { return false; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Animal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Animal.java.patch similarity index 83% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Animal.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Animal.java.patch index c3a83c48e..200e9463c 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Animal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Animal.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Animal.java b/net/minecraft/world/entity/animal/Animal.java -index 384cf7e65cf6a802ba58d5327e971ac033e23962..8ccab236d1b8b00485eb6608778c43c5581641bd 100644 --- a/net/minecraft/world/entity/animal/Animal.java +++ b/net/minecraft/world/entity/animal/Animal.java -@@ -142,7 +142,7 @@ public abstract class Animal extends AgeableMob { +@@ -140,7 +_,7 @@ ItemStack itemInHand = player.getItemInHand(hand); if (this.isFood(itemInHand)) { int age = this.getAge(); @@ -17,7 +9,7 @@ index 384cf7e65cf6a802ba58d5327e971ac033e23962..8ccab236d1b8b00485eb6608778c43c5 final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying this.usePlayerItem(player, hand, itemInHand); this.setInLove(serverPlayer, breedCopy); // Paper - Fix EntityBreedEvent copying -@@ -224,10 +224,20 @@ public abstract class Animal extends AgeableMob { +@@ -221,10 +_,20 @@ public void spawnChildFromBreeding(ServerLevel level, Animal partner) { AgeableMob breedOffspring = this.getBreedOffspring(level, partner); if (breedOffspring != null) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Bee.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/bee/Bee.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Bee.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/bee/Bee.java.patch index 0d4adc4fd..6ab0f2692 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Bee.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/bee/Bee.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java -index e94c6c1ee969a7d0953b933fb0633cebb510a68c..3988a8e8ba319e5e80a9fba916b62bdb4996e08f 100644 ---- a/net/minecraft/world/entity/animal/Bee.java -+++ b/net/minecraft/world/entity/animal/Bee.java -@@ -171,7 +171,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +--- a/net/minecraft/world/entity/animal/bee/Bee.java ++++ b/net/minecraft/world/entity/animal/bee/Bee.java +@@ -171,7 +_,7 @@ // Paper end - Fix MC-167279 this.lookControl = new Bee.BeeLookControl(this); this.setPathfindingMalus(PathType.DANGER_FIRE, -1.0F); @@ -17,16 +9,18 @@ index e94c6c1ee969a7d0953b933fb0633cebb510a68c..3988a8e8ba319e5e80a9fba916b62bdb this.setPathfindingMalus(PathType.WATER_BORDER, 16.0F); this.setPathfindingMalus(PathType.COCOA, -1.0F); this.setPathfindingMalus(PathType.FENCE, -1.0F); -@@ -367,7 +367,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -367,6 +_,10 @@ + } } - public static boolean isNightOrRaining(Level level) { -- return level.dimensionType().hasSkyLight() && level.dimension() != Level.END && (level.isDarkOutside() || level.isRaining()); ++ /*public static boolean isNightOrRaining(Level level) { + return level.dimensionType().hasSkyLight() && (level.isDarkOutside() && !level.purpurConfig.beeCanWorkAtNight || level.isRaining() && !level.purpurConfig.beeCanWorkInRain); // Purpur - Bee can work when raining or at night - } - ++ }*/ ++ public void setStayOutOfHiveCountdown(int stayOutOfHiveCountdown) { -@@ -390,7 +390,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { + this.stayOutOfHiveCountdown = stayOutOfHiveCountdown; + } +@@ -387,7 +_,7 @@ @Override protected void customServerAiStep(ServerLevel level) { boolean hasStung = this.hasStung(); @@ -35,7 +29,7 @@ index e94c6c1ee969a7d0953b933fb0633cebb510a68c..3988a8e8ba319e5e80a9fba916b62bdb this.underWaterTicks++; } else { this.underWaterTicks = 0; -@@ -400,6 +400,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -397,6 +_,7 @@ this.hurtServer(level, this.damageSources().drown(), 1.0F); } @@ -43,7 +37,7 @@ index e94c6c1ee969a7d0953b933fb0633cebb510a68c..3988a8e8ba319e5e80a9fba916b62bdb if (hasStung) { this.timeSinceSting++; if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) { -@@ -1139,6 +1140,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1130,6 +_,7 @@ Bee.this.savedFlowerPos = optional.get(); Bee.this.navigation .moveTo(Bee.this.savedFlowerPos.getX() + 0.5, Bee.this.savedFlowerPos.getY() + 0.5, Bee.this.savedFlowerPos.getZ() + 0.5, 1.2F); @@ -51,7 +45,7 @@ index e94c6c1ee969a7d0953b933fb0633cebb510a68c..3988a8e8ba319e5e80a9fba916b62bdb return true; } else { Bee.this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(Bee.this.random, 20, 60); -@@ -1185,6 +1187,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1176,6 +_,7 @@ this.pollinating = false; Bee.this.navigation.stop(); Bee.this.remainingCooldownBeforeLocatingNewFlower = 200; @@ -59,7 +53,7 @@ index e94c6c1ee969a7d0953b933fb0633cebb510a68c..3988a8e8ba319e5e80a9fba916b62bdb } @Override -@@ -1231,6 +1234,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1222,6 +_,7 @@ this.setWantedPos(); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/AbstractCow.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/cow/AbstractCow.java.patch similarity index 87% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/AbstractCow.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/cow/AbstractCow.java.patch index c115fdc82..6ab713663 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/AbstractCow.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/cow/AbstractCow.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/AbstractCow.java b/net/minecraft/world/entity/animal/AbstractCow.java -index 1bedc350a6625adc12359d9c9290a01e44fa638f..439d0dfabf9263bfbfb727b87dba17e848f6e66c 100644 ---- a/net/minecraft/world/entity/animal/AbstractCow.java -+++ b/net/minecraft/world/entity/animal/AbstractCow.java -@@ -39,7 +39,7 @@ public abstract class AbstractCow extends Animal { +--- a/net/minecraft/world/entity/animal/cow/AbstractCow.java ++++ b/net/minecraft/world/entity/animal/cow/AbstractCow.java +@@ -40,7 +_,7 @@ this.goalSelector.addGoal(0, new FloatGoal(this)); this.goalSelector.addGoal(1, new PanicGoal(this, 2.0)); this.goalSelector.addGoal(2, new BreedGoal(this, 1.0)); @@ -17,7 +9,7 @@ index 1bedc350a6625adc12359d9c9290a01e44fa638f..439d0dfabf9263bfbfb727b87dba17e8 this.goalSelector.addGoal(4, new FollowParentGoal(this, 1.25)); this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 1.0)); this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F)); -@@ -95,6 +95,10 @@ public abstract class AbstractCow extends Animal { +@@ -96,6 +_,10 @@ ItemStack itemStack = ItemUtils.createFilledResult(itemInHand, player, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit player.setItemInHand(hand, itemStack); return InteractionResult.SUCCESS; @@ -28,7 +20,7 @@ index 1bedc350a6625adc12359d9c9290a01e44fa638f..439d0dfabf9263bfbfb727b87dba17e8 } else { return super.mobInteract(player, hand); } -@@ -104,4 +108,67 @@ public abstract class AbstractCow extends Animal { +@@ -105,4 +_,67 @@ public EntityDimensions getDefaultDimensions(Pose pose) { return this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/MushroomCow.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/cow/MushroomCow.java.patch similarity index 59% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/MushroomCow.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/cow/MushroomCow.java.patch index 618242477..c042bfe98 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/MushroomCow.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/cow/MushroomCow.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/MushroomCow.java b/net/minecraft/world/entity/animal/MushroomCow.java -index 7b4f76ae8907ae45cb0ac6fa397a319ab3cc2a22..3ce300a6abc4ee39f010ff5318b64c50e732742b 100644 ---- a/net/minecraft/world/entity/animal/MushroomCow.java -+++ b/net/minecraft/world/entity/animal/MushroomCow.java -@@ -201,6 +201,13 @@ public class MushroomCow extends AbstractCow implements Shearable { +--- a/net/minecraft/world/entity/animal/cow/MushroomCow.java ++++ b/net/minecraft/world/entity/animal/cow/MushroomCow.java +@@ -199,6 +_,13 @@ level.playSound(null, this, SoundEvents.MOOSHROOM_SHEAR, source, 1.0F, 1.0F); this.convertTo(EntityType.COW, ConversionParams.single(this, false, false), cow -> { level.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5), this.getZ(), 1, 0.0, 0.0, 0.0, 0.0); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Dolphin.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/dolphin/Dolphin.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Dolphin.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/dolphin/Dolphin.java.patch index 90a3cdd01..4cfc72671 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Dolphin.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/dolphin/Dolphin.java.patch @@ -1,22 +1,14 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Dolphin.java b/net/minecraft/world/entity/animal/Dolphin.java -index 91ee1423557d7287de9f4adc8376b0b7ee8c94ac..487a0e850d1d4f4c2e9c1175708712146f809a68 100644 ---- a/net/minecraft/world/entity/animal/Dolphin.java -+++ b/net/minecraft/world/entity/animal/Dolphin.java -@@ -75,6 +75,7 @@ public class Dolphin extends AgeableWaterCreature { +--- a/net/minecraft/world/entity/animal/dolphin/Dolphin.java ++++ b/net/minecraft/world/entity/animal/dolphin/Dolphin.java +@@ -75,6 +_,7 @@ + public static final float BABY_SCALE = 0.65F; private static final boolean DEFAULT_GOT_FISH = false; - @Nullable - public BlockPos treasurePos; + @Nullable public BlockPos treasurePos; + private boolean isNaturallyAggressiveToPlayers; // Purpur - Dolphins naturally aggressive to players chance public Dolphin(EntityType type, Level level) { super(type, level); -@@ -91,6 +92,7 @@ public class Dolphin extends AgeableWaterCreature { +@@ -90,6 +_,7 @@ this.setAirSupply(this.getMaxAirSupply()); this.setXRot(0.0F); SpawnGroupData spawnGroupData1 = Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.1F)); @@ -24,7 +16,7 @@ index 91ee1423557d7287de9f4adc8376b0b7ee8c94ac..487a0e850d1d4f4c2e9c117570871214 return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData1); } -@@ -157,17 +159,19 @@ public class Dolphin extends AgeableWaterCreature { +@@ -155,17 +_,19 @@ protected void registerGoals() { this.goalSelector.addGoal(0, new BreathAirGoal(this)); this.goalSelector.addGoal(0, new TryFindWaterGoal(this)); @@ -45,7 +37,7 @@ index 91ee1423557d7287de9f4adc8376b0b7ee8c94ac..487a0e850d1d4f4c2e9c117570871214 } public static AttributeSupplier.Builder createAttributes() { -@@ -400,6 +404,7 @@ public class Dolphin extends AgeableWaterCreature { +@@ -392,6 +_,7 @@ @Override public boolean canUse() { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/horse/Llama.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/equine/Llama.java.patch similarity index 59% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/horse/Llama.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/equine/Llama.java.patch index 1c649ae53..f5a863392 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/horse/Llama.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/equine/Llama.java.patch @@ -1,22 +1,14 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/horse/Llama.java b/net/minecraft/world/entity/animal/horse/Llama.java -index 050daf9e733b1b9edfa9862c5baf5e5412431fed..bcbbcea51261a2f1d6fbe3463e06900a6cd3d0ba 100644 ---- a/net/minecraft/world/entity/animal/horse/Llama.java -+++ b/net/minecraft/world/entity/animal/horse/Llama.java -@@ -78,6 +78,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { - private Llama caravanHead; - @Nullable - public Llama caravanTail; // Paper - public +--- a/net/minecraft/world/entity/animal/equine/Llama.java ++++ b/net/minecraft/world/entity/animal/equine/Llama.java +@@ -76,6 +_,7 @@ + boolean didSpit; + private @Nullable Llama caravanHead; + public @Nullable Llama caravanTail; // Paper - public + public boolean shouldJoinCaravan = true; // Purpur - Llama API public Llama(EntityType type, Level level) { super(type, level); -@@ -107,6 +108,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -105,6 +_,7 @@ super.addAdditionalSaveData(output); output.store("Variant", Llama.Variant.LEGACY_CODEC, this.getVariant()); output.putInt("Strength", this.getStrength()); @@ -24,7 +16,7 @@ index 050daf9e733b1b9edfa9862c5baf5e5412431fed..bcbbcea51261a2f1d6fbe3463e06900a } @Override -@@ -114,6 +116,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -112,6 +_,7 @@ this.setStrength(input.getIntOr("Strength", 0)); super.readAdditionalSaveData(input); this.setVariant(input.read("Variant", Llama.Variant.LEGACY_CODEC).orElse(Llama.Variant.DEFAULT)); @@ -32,7 +24,7 @@ index 050daf9e733b1b9edfa9862c5baf5e5412431fed..bcbbcea51261a2f1d6fbe3463e06900a } @Override -@@ -395,6 +398,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -388,6 +_,7 @@ public void leaveCaravan() { if (this.caravanHead != null) { @@ -40,7 +32,7 @@ index 050daf9e733b1b9edfa9862c5baf5e5412431fed..bcbbcea51261a2f1d6fbe3463e06900a this.caravanHead.caravanTail = null; } -@@ -402,6 +406,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -395,6 +_,7 @@ } public void joinCaravan(Llama caravanHead) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Cat.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/feline/Cat.java.patch similarity index 61% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Cat.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/feline/Cat.java.patch index a1cd244ca..ff93d1657 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Cat.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/feline/Cat.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java -index e1f12787a83458fd51dae6a907bbb81e3e522254..f6912836026638900fa5929b9550386a004fef11 100644 ---- a/net/minecraft/world/entity/animal/Cat.java -+++ b/net/minecraft/world/entity/animal/Cat.java -@@ -355,6 +355,14 @@ public class Cat extends TamableAnimal { +--- a/net/minecraft/world/entity/animal/feline/Cat.java ++++ b/net/minecraft/world/entity/animal/feline/Cat.java +@@ -354,6 +_,14 @@ return this.isTame() && otherAnimal instanceof Cat cat && cat.isTame() && super.canMate(otherAnimal); } @@ -20,10 +12,10 @@ index e1f12787a83458fd51dae6a907bbb81e3e522254..f6912836026638900fa5929b9550386a + } + // Purpur end - Configurable default collar color + - @Nullable @Override - public SpawnGroupData finalizeSpawn( -@@ -453,7 +461,7 @@ public class Cat extends TamableAnimal { + public @Nullable SpawnGroupData finalizeSpawn( + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData +@@ -451,7 +_,7 @@ } private void tryToTame(Player player) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/feline/Ocelot.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/feline/Ocelot.java.patch new file mode 100644 index 000000000..21c0a7907 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/feline/Ocelot.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/feline/Ocelot.java ++++ b/net/minecraft/world/entity/animal/feline/Ocelot.java +@@ -234,7 +_,7 @@ + public boolean checkSpawnObstruction(LevelReader level) { + if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) { + BlockPos blockPos = this.blockPosition(); +- if (blockPos.getY() < level.getSeaLevel()) { ++ if (!level().purpurConfig.ocelotSpawnUnderSeaLevel && blockPos.getY() < level.getSeaLevel()) { // Purpur - Option Ocelot Spawn Under Sea Level + return false; + } + diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/fish/WaterAnimal.java.patch similarity index 56% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/fish/WaterAnimal.java.patch index 46ed3ef48..a572fa81f 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/fish/WaterAnimal.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/WaterAnimal.java b/net/minecraft/world/entity/animal/WaterAnimal.java -index b299512f2c495769c07f0fa911eed546b28cab9b..792221566b3ade7e55405a13e0877445445d97b5 100644 ---- a/net/minecraft/world/entity/animal/WaterAnimal.java -+++ b/net/minecraft/world/entity/animal/WaterAnimal.java -@@ -76,8 +76,7 @@ public abstract class WaterAnimal extends PathfinderMob { +--- a/net/minecraft/world/entity/animal/fish/WaterAnimal.java ++++ b/net/minecraft/world/entity/animal/fish/WaterAnimal.java +@@ -76,8 +_,7 @@ seaLevel = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(seaLevel); i = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(i); // Paper end - Make water animal spawn height configurable diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Fox.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/fox/Fox.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Fox.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/fox/Fox.java.patch index a96a4188a..f6fdc8513 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Fox.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/fox/Fox.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java -index 849ae9efc0d1e01ff1be36cc873e69530ea30691..30a781b28fc4c78ca581fba405fae66f5b72251e 100644 ---- a/net/minecraft/world/entity/animal/Fox.java -+++ b/net/minecraft/world/entity/animal/Fox.java -@@ -348,6 +348,11 @@ public class Fox extends Animal { +--- a/net/minecraft/world/entity/animal/fox/Fox.java ++++ b/net/minecraft/world/entity/animal/fox/Fox.java +@@ -357,6 +_,11 @@ } private void setTargetGoals() { @@ -20,18 +12,19 @@ index 849ae9efc0d1e01ff1be36cc873e69530ea30691..30a781b28fc4c78ca581fba405fae66f if (this.getVariant() == Fox.Variant.RED) { this.targetSelector.addGoal(4, this.landTargetGoal); this.targetSelector.addGoal(4, this.turtleEggTargetGoal); -@@ -375,6 +380,7 @@ public class Fox extends Animal { +@@ -384,6 +_,7 @@ public void setVariant(Fox.Variant variant) { this.entityData.set(DATA_TYPE_ID, variant.getId()); + this.setTargetGoals(); // Purpur - Tulips change fox type - fix API bug not updating pathfinders on type change } - @Nullable -@@ -705,6 +711,29 @@ public class Fox extends Animal { + @Override +@@ -709,6 +_,29 @@ + return slot == EquipmentSlot.MAINHAND; } // Paper end - ++ + // Purpur start - Tulips change fox type + @Override + public net.minecraft.world.InteractionResult mobInteract(Player player, net.minecraft.world.InteractionHand hand) { @@ -54,7 +47,6 @@ index 849ae9efc0d1e01ff1be36cc873e69530ea30691..30a781b28fc4c78ca581fba405fae66f + return super.mobInteract(player, hand); + } + // Purpur end - Tulips change fox type -+ + @Override // Paper start - Cancellable death event - protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(ServerLevel level, DamageSource damageSource) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/goat/Goat.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/goat/Goat.java.patch similarity index 57% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/goat/Goat.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/goat/Goat.java.patch index 5ae3f8feb..d854787d7 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/goat/Goat.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/goat/Goat.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java -index 7549be3f72beb31ce20cbac96f4909368d877067..4f87e06695e49c09078ab673119e2af9f5158bae 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java -@@ -390,6 +390,7 @@ public class Goat extends Animal { +@@ -389,6 +_,7 @@ // Paper start - Goat ram API public void ram(net.minecraft.world.entity.LivingEntity entity) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/coppergolem/CopperGolem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/CopperGolem.java.patch similarity index 65% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/coppergolem/CopperGolem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/CopperGolem.java.patch index 21d01e818..6ce83f8b0 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/coppergolem/CopperGolem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/CopperGolem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/coppergolem/CopperGolem.java b/net/minecraft/world/entity/animal/coppergolem/CopperGolem.java -index f16a4c8b568603d26e05d028f6f2f08822f2f045..9de4727596b2fde69f4049734eee0f1d81079b6f 100644 ---- a/net/minecraft/world/entity/animal/coppergolem/CopperGolem.java -+++ b/net/minecraft/world/entity/animal/coppergolem/CopperGolem.java -@@ -86,6 +86,7 @@ public class CopperGolem extends AbstractGolem implements ContainerUser, Shearab +--- a/net/minecraft/world/entity/animal/golem/CopperGolem.java ++++ b/net/minecraft/world/entity/animal/golem/CopperGolem.java +@@ -83,6 +_,7 @@ private final AnimationState interactionDropItemAnimationState = new AnimationState(); private final AnimationState interactionDropNoItemAnimationState = new AnimationState(); public static final EquipmentSlot EQUIPMENT_SLOT_ANTENNA = EquipmentSlot.SADDLE; @@ -16,7 +8,7 @@ index f16a4c8b568603d26e05d028f6f2f08822f2f045..9de4727596b2fde69f4049734eee0f1d public CopperGolem(EntityType type, Level level) { super(type, level); -@@ -99,6 +100,17 @@ public class CopperGolem extends AbstractGolem implements ContainerUser, Shearab +@@ -96,6 +_,17 @@ this.getBrain().setMemory(MemoryModuleType.TRANSPORT_ITEMS_COOLDOWN_TICKS, this.getRandom().nextInt(60, 100)); } @@ -34,7 +26,7 @@ index f16a4c8b568603d26e05d028f6f2f08822f2f045..9de4727596b2fde69f4049734eee0f1d public static AttributeSupplier.Builder createAttributes() { return Mob.createMobAttributes().add(Attributes.MOVEMENT_SPEED, 0.2F).add(Attributes.STEP_HEIGHT, 1.0).add(Attributes.MAX_HEALTH, 12.0); } -@@ -174,6 +186,7 @@ public class CopperGolem extends AbstractGolem implements ContainerUser, Shearab +@@ -171,6 +_,7 @@ super.addAdditionalSaveData(output); output.putLong("next_weather_age", this.nextWeatheringTick); output.store("weather_state", WeatheringCopper.WeatherState.CODEC, this.getWeatherState()); @@ -42,7 +34,7 @@ index f16a4c8b568603d26e05d028f6f2f08822f2f045..9de4727596b2fde69f4049734eee0f1d } @Override -@@ -181,6 +194,7 @@ public class CopperGolem extends AbstractGolem implements ContainerUser, Shearab +@@ -178,6 +_,7 @@ super.readAdditionalSaveData(input); this.nextWeatheringTick = input.getLongOr("next_weather_age", -1L); this.setWeatherState(input.read("weather_state", WeatheringCopper.WeatherState.CODEC).orElse(WeatheringCopper.WeatherState.UNAFFECTED)); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/coppergolem/CopperGolemAi.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/CopperGolemAi.java.patch similarity index 69% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/coppergolem/CopperGolemAi.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/CopperGolemAi.java.patch index 0ce806f82..81805e39c 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/coppergolem/CopperGolemAi.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/CopperGolemAi.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/coppergolem/CopperGolemAi.java b/net/minecraft/world/entity/animal/coppergolem/CopperGolemAi.java -index e0875dd19a10cbf03daf67860993fb37ac0097e2..46e947adc04664839025c4167872c427d241b5d3 100644 ---- a/net/minecraft/world/entity/animal/coppergolem/CopperGolemAi.java -+++ b/net/minecraft/world/entity/animal/coppergolem/CopperGolemAi.java -@@ -43,7 +43,7 @@ public class CopperGolemAi { +--- a/net/minecraft/world/entity/animal/golem/CopperGolemAi.java ++++ b/net/minecraft/world/entity/animal/golem/CopperGolemAi.java +@@ -43,7 +_,7 @@ private static final int TICK_TO_START_ON_REACHED_INTERACTION = 1; private static final int TICK_TO_PLAY_ON_REACHED_SOUND = 9; private static final Predicate TRANSPORT_ITEM_SOURCE_BLOCK = state -> state.is(BlockTags.COPPER_CHESTS); @@ -17,7 +9,7 @@ index e0875dd19a10cbf03daf67860993fb37ac0097e2..46e947adc04664839025c4167872c427 private static final ImmutableList>> SENSOR_TYPES = ImmutableList.of( SensorType.NEAREST_LIVING_ENTITIES, SensorType.HURT_BY ); -@@ -158,6 +158,11 @@ public class CopperGolemAi { +@@ -158,6 +_,11 @@ } if (integer == 60) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/IronGolem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/IronGolem.java.patch similarity index 68% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/IronGolem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/IronGolem.java.patch index 05fede9e2..3e7848345 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/IronGolem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/IronGolem.java.patch @@ -1,17 +1,9 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/IronGolem.java b/net/minecraft/world/entity/animal/IronGolem.java -index 6ba3d1f1019af2b2dde3804635a278e8d2c33dc8..838cc49d1a8b1b9758121c07de9e483966eef245 100644 ---- a/net/minecraft/world/entity/animal/IronGolem.java -+++ b/net/minecraft/world/entity/animal/IronGolem.java -@@ -59,13 +59,26 @@ public class IronGolem extends AbstractGolem implements NeutralMob { - private int remainingPersistentAngerTime; - @Nullable - private UUID persistentAngerTarget; +--- a/net/minecraft/world/entity/animal/golem/IronGolem.java ++++ b/net/minecraft/world/entity/animal/golem/IronGolem.java +@@ -58,13 +_,26 @@ + private static final UniformInt PERSISTENT_ANGER_TIME = TimeUtil.rangeOfSeconds(20, 39); + private long persistentAngerEndTime; + private @Nullable EntityReference persistentAngerTarget; + @Nullable private UUID summoner; // Purpur - Summoner API public IronGolem(EntityType type, Level level) { @@ -35,7 +27,7 @@ index 6ba3d1f1019af2b2dde3804635a278e8d2c33dc8..838cc49d1a8b1b9758121c07de9e4839 this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0, true)); this.goalSelector.addGoal(2, new MoveTowardsTargetGoal(this, 0.9, 32.0F)); this.goalSelector.addGoal(2, new MoveBackToVillageGoal(this, 0.6, false)); -@@ -143,6 +156,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -142,6 +_,7 @@ protected void addAdditionalSaveData(ValueOutput output) { super.addAdditionalSaveData(output); output.putBoolean("PlayerCreated", this.isPlayerCreated()); @@ -43,7 +35,7 @@ index 6ba3d1f1019af2b2dde3804635a278e8d2c33dc8..838cc49d1a8b1b9758121c07de9e4839 this.addPersistentAngerSaveData(output); } -@@ -150,6 +164,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -149,6 +_,7 @@ protected void readAdditionalSaveData(ValueInput input) { super.readAdditionalSaveData(input); this.setPlayerCreated(input.getBooleanOr("PlayerCreated", false)); @@ -51,7 +43,7 @@ index 6ba3d1f1019af2b2dde3804635a278e8d2c33dc8..838cc49d1a8b1b9758121c07de9e4839 this.readPersistentAngerSaveData(this.level(), input); } -@@ -269,6 +284,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -267,6 +_,7 @@ float f = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F; this.playSound(SoundEvents.IRON_GOLEM_REPAIR, 1.0F, f); itemInHand.consume(1, player); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/SnowGolem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/SnowGolem.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/SnowGolem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/SnowGolem.java.patch index a62a2c9a7..7d8d90403 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/SnowGolem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/golem/SnowGolem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/SnowGolem.java b/net/minecraft/world/entity/animal/SnowGolem.java -index 1029f3342e8ba5754d99bd20106aaa30bca5ab19..8fa983d168874ef1497dc38b673295eb76a4e8b4 100644 ---- a/net/minecraft/world/entity/animal/SnowGolem.java -+++ b/net/minecraft/world/entity/animal/SnowGolem.java -@@ -46,15 +46,27 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +--- a/net/minecraft/world/entity/animal/golem/SnowGolem.java ++++ b/net/minecraft/world/entity/animal/golem/SnowGolem.java +@@ -46,15 +_,27 @@ private static final EntityDataAccessor DATA_PUMPKIN_ID = SynchedEntityData.defineId(SnowGolem.class, EntityDataSerializers.BYTE); private static final byte PUMPKIN_FLAG = 16; private static final boolean DEFAULT_PUMPKIN = true; @@ -38,7 +30,7 @@ index 1029f3342e8ba5754d99bd20106aaa30bca5ab19..8fa983d168874ef1497dc38b673295eb this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 6.0F)); this.goalSelector.addGoal(4, new RandomLookAroundGoal(this)); this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (entity, level) -> entity instanceof Enemy)); -@@ -74,12 +86,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -74,12 +_,14 @@ protected void addAdditionalSaveData(ValueOutput output) { super.addAdditionalSaveData(output); output.putBoolean("Pumpkin", this.hasPumpkin()); @@ -53,7 +45,7 @@ index 1029f3342e8ba5754d99bd20106aaa30bca5ab19..8fa983d168874ef1497dc38b673295eb } @Override -@@ -153,6 +167,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -153,6 +_,14 @@ } return InteractionResult.SUCCESS; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Parrot.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/parrot/Parrot.java.patch similarity index 67% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Parrot.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/parrot/Parrot.java.patch index bc4e5e291..66096c247 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Parrot.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/parrot/Parrot.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Parrot.java b/net/minecraft/world/entity/animal/Parrot.java -index 55d66e13d74f0ed3b4260b806eae03c0ef5053da..f5bd84355cd57b7a8c3ccd0f9ed2f714ff21233b 100644 ---- a/net/minecraft/world/entity/animal/Parrot.java -+++ b/net/minecraft/world/entity/animal/Parrot.java -@@ -160,6 +160,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +--- a/net/minecraft/world/entity/animal/parrot/Parrot.java ++++ b/net/minecraft/world/entity/animal/parrot/Parrot.java +@@ -164,6 +_,7 @@ protected void registerGoals() { this.goalSelector.addGoal(0, new TamableAnimal.TamableAnimalPanicGoal(1.25)); this.goalSelector.addGoal(0, new FloatGoal(this)); @@ -16,7 +8,7 @@ index 55d66e13d74f0ed3b4260b806eae03c0ef5053da..f5bd84355cd57b7a8c3ccd0f9ed2f714 this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F)); this.goalSelector.addGoal(2, new SitWhenOrderedToGoal(this)); this.goalSelector.addGoal(2, new FollowOwnerGoal(this, 1.0, 5.0F, 1.0F)); -@@ -265,7 +266,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -269,7 +_,7 @@ } if (!this.level().isClientSide()) { @@ -25,7 +17,7 @@ index 55d66e13d74f0ed3b4260b806eae03c0ef5053da..f5bd84355cd57b7a8c3ccd0f9ed2f714 this.tame(player); this.level().broadcastEntityEvent(this, EntityEvent.TAMING_SUCCEEDED); } else { -@@ -273,6 +274,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -277,6 +_,7 @@ } } @@ -33,7 +25,7 @@ index 55d66e13d74f0ed3b4260b806eae03c0ef5053da..f5bd84355cd57b7a8c3ccd0f9ed2f714 return InteractionResult.SUCCESS; } else if (!itemInHand.is(ItemTags.PARROT_POISONOUS_FOOD)) { if (!this.isFlying() && this.isTame() && this.isOwnedBy(player)) { -@@ -297,7 +299,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -301,7 +_,7 @@ @Override public boolean isFood(ItemStack stack) { @@ -42,7 +34,7 @@ index 55d66e13d74f0ed3b4260b806eae03c0ef5053da..f5bd84355cd57b7a8c3ccd0f9ed2f714 } public static boolean checkParrotSpawnRules( -@@ -312,13 +314,13 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -316,12 +_,12 @@ @Override public boolean canMate(Animal otherAnimal) { @@ -50,11 +42,10 @@ index 55d66e13d74f0ed3b4260b806eae03c0ef5053da..f5bd84355cd57b7a8c3ccd0f9ed2f714 + return super.canMate(otherAnimal); // Purpur - Breedable parrots } - @Nullable @Override - public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob partner) { + public @Nullable AgeableMob getBreedOffspring(ServerLevel level, AgeableMob partner) { - return null; + return level.purpurConfig.parrotBreedable ? EntityType.PARROT.create(level, EntitySpawnReason.BREEDING) : null; // Purpur - Breedable parrots } - @Nullable + @Override diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Pig.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/pig/Pig.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Pig.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/pig/Pig.java.patch index 3092a7d98..0f01dac09 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Pig.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/pig/Pig.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Pig.java b/net/minecraft/world/entity/animal/Pig.java -index bbb1b6033c7e742cf1cdf35fdce0dc127aa37756..8a12ac29e2221c7e91f4935046894fbc77eaf2a1 100644 ---- a/net/minecraft/world/entity/animal/Pig.java -+++ b/net/minecraft/world/entity/animal/Pig.java -@@ -142,6 +142,19 @@ public class Pig extends Animal implements ItemSteerable { +--- a/net/minecraft/world/entity/animal/pig/Pig.java ++++ b/net/minecraft/world/entity/animal/pig/Pig.java +@@ -142,6 +_,19 @@ @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { boolean isFood = this.isFood(player.getItemInHand(hand)); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/PolarBear.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/polarbear/PolarBear.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/PolarBear.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/polarbear/PolarBear.java.patch index 8614c56fe..06b4c45f4 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/PolarBear.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/polarbear/PolarBear.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/PolarBear.java b/net/minecraft/world/entity/animal/PolarBear.java -index 3365988779494860e3248487ed3e9f7c16848a7b..59288cb00951808d3ea7921875c9cbecb2de7f98 100644 ---- a/net/minecraft/world/entity/animal/PolarBear.java -+++ b/net/minecraft/world/entity/animal/PolarBear.java -@@ -65,6 +65,29 @@ public class PolarBear extends Animal implements NeutralMob { +--- a/net/minecraft/world/entity/animal/polarbear/PolarBear.java ++++ b/net/minecraft/world/entity/animal/polarbear/PolarBear.java +@@ -66,6 +_,29 @@ super(type, level); } @@ -35,10 +27,10 @@ index 3365988779494860e3248487ed3e9f7c16848a7b..59288cb00951808d3ea7921875c9cbec + } + // Purpur end - Breedable Polar Bears + - @Nullable @Override - public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob partner) { -@@ -73,7 +96,7 @@ public class PolarBear extends Animal implements NeutralMob { + public @Nullable AgeableMob getBreedOffspring(ServerLevel level, AgeableMob partner) { + return EntityType.POLAR_BEAR.create(level, EntitySpawnReason.BREEDING); +@@ -73,7 +_,7 @@ @Override public boolean isFood(ItemStack stack) { @@ -47,7 +39,7 @@ index 3365988779494860e3248487ed3e9f7c16848a7b..59288cb00951808d3ea7921875c9cbec } @Override -@@ -82,6 +105,12 @@ public class PolarBear extends Animal implements NeutralMob { +@@ -82,6 +_,12 @@ this.goalSelector.addGoal(0, new FloatGoal(this)); this.goalSelector.addGoal(1, new PolarBear.PolarBearMeleeAttackGoal()); this.goalSelector.addGoal(1, new PanicGoal(this, 2.0, mob -> mob.isBaby() ? DamageTypeTags.PANIC_CAUSES : DamageTypeTags.PANIC_ENVIRONMENTAL_CAUSES)); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Rabbit.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/rabbit/Rabbit.java.patch similarity index 67% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Rabbit.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/rabbit/Rabbit.java.patch index b798c6422..d378a0a96 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Rabbit.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/rabbit/Rabbit.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java -index 94aaae063defb56461351887b4a3023a62e4ce24..aa5bca6c0633cffdbb79ecc50d68e5c4bc2e54cf 100644 ---- a/net/minecraft/world/entity/animal/Rabbit.java -+++ b/net/minecraft/world/entity/animal/Rabbit.java -@@ -406,10 +406,23 @@ public class Rabbit extends Animal { +--- a/net/minecraft/world/entity/animal/rabbit/Rabbit.java ++++ b/net/minecraft/world/entity/animal/rabbit/Rabbit.java +@@ -404,10 +_,23 @@ } this.setVariant(randomRabbitVariant); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/squid/GlowSquid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/squid/GlowSquid.java.patch new file mode 100644 index 000000000..00859fa4c --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/squid/GlowSquid.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/world/entity/animal/squid/GlowSquid.java ++++ b/net/minecraft/world/entity/animal/squid/GlowSquid.java +@@ -30,6 +_,13 @@ + super(type, level); + } + ++ // Purpur start - Flying squids! Oh my! ++ @Override ++ public boolean canFly() { ++ return this.level().purpurConfig.glowSquidsCanFly; ++ } ++ // Purpur end - Flying squids! Oh my! ++ + @Override + protected ParticleOptions getInkParticle() { + return ParticleTypes.GLOW_SQUID_INK; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Squid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/squid/Squid.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Squid.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/squid/Squid.java.patch index 74313c753..9ca8b5607 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Squid.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/squid/Squid.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Squid.java b/net/minecraft/world/entity/animal/Squid.java -index 8313ea146ba6910d92653c29887c94b75f68cce4..1f63894c82f39e43a25b9900f8f92f83cc5b6e66 100644 ---- a/net/minecraft/world/entity/animal/Squid.java -+++ b/net/minecraft/world/entity/animal/Squid.java -@@ -47,10 +47,29 @@ public class Squid extends AgeableWaterCreature { +--- a/net/minecraft/world/entity/animal/squid/Squid.java ++++ b/net/minecraft/world/entity/animal/squid/Squid.java +@@ -48,10 +_,29 @@ public Squid(EntityType type, Level level) { super(type, level); @@ -39,7 +31,7 @@ index 8313ea146ba6910d92653c29887c94b75f68cce4..1f63894c82f39e43a25b9900f8f92f83 @Override protected void registerGoals() { this.goalSelector.addGoal(0, new Squid.SquidRandomMovementGoal(this)); -@@ -128,6 +147,7 @@ public class Squid extends AgeableWaterCreature { +@@ -128,6 +_,7 @@ } if (this.isInWater()) { @@ -47,7 +39,7 @@ index 8313ea146ba6910d92653c29887c94b75f68cce4..1f63894c82f39e43a25b9900f8f92f83 if (this.tentacleMovement < (float) Math.PI) { float f = this.tentacleMovement / (float) Math.PI; this.tentacleAngle = Mth.sin(f * f * (float) Math.PI) * (float) Math.PI * 0.25F; -@@ -309,7 +329,7 @@ public class Squid extends AgeableWaterCreature { +@@ -308,7 +_,7 @@ int noActionTime = this.squid.getNoActionTime(); if (noActionTime > 100) { this.squid.movementVector = Vec3.ZERO; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/wolf/Wolf.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/wolf/Wolf.java.patch similarity index 88% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/wolf/Wolf.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/wolf/Wolf.java.patch index 81278bd9c..e7ed8a723 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/wolf/Wolf.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/wolf/Wolf.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/wolf/Wolf.java b/net/minecraft/world/entity/animal/wolf/Wolf.java -index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cddde22e14d 100644 --- a/net/minecraft/world/entity/animal/wolf/Wolf.java +++ b/net/minecraft/world/entity/animal/wolf/Wolf.java -@@ -100,6 +100,37 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -100,6 +_,37 @@ EntityType type = entity.getType(); return type == EntityType.SHEEP || type == EntityType.RABBIT || type == EntityType.FOX; }; @@ -46,7 +38,7 @@ index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cdd private static final float START_HEALTH = 8.0F; private static final float TAME_HEALTH = 40.0F; private static final float ARMOR_REPAIR_UNIT = 0.125F; -@@ -122,12 +153,47 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -121,12 +_,47 @@ this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F); } @@ -94,7 +86,7 @@ index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cdd this.goalSelector.addGoal(4, new LeapAtTargetGoal(this, 0.4F)); this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0, true)); this.goalSelector.addGoal(6, new FollowOwnerGoal(this, 1.0, 10.0F, 2.0F)); -@@ -140,7 +206,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -139,7 +_,7 @@ this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this)); this.targetSelector.addGoal(3, new HurtByTargetGoal(this).setAlertOthers()); this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt)); @@ -103,7 +95,7 @@ index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cdd this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR)); this.targetSelector.addGoal(7, new NearestAttackableTargetGoal<>(this, AbstractSkeleton.class, false)); this.targetSelector.addGoal(8, new ResetUniversalAngerTargetGoal<>(this, true)); -@@ -231,6 +297,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -229,6 +_,7 @@ protected void addAdditionalSaveData(ValueOutput output) { super.addAdditionalSaveData(output); output.store("CollarColor", DyeColor.LEGACY_ID_CODEC, this.getCollarColor()); @@ -111,7 +103,7 @@ index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cdd VariantUtils.writeVariant(output, this.getVariant()); this.addPersistentAngerSaveData(output); this.getSoundVariant() -@@ -245,6 +312,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -243,6 +_,10 @@ super.readAdditionalSaveData(input); VariantUtils.readVariant(input, Registries.WOLF_VARIANT).ifPresent(this::setVariant); this.setCollarColor(input.read("CollarColor", DyeColor.LEGACY_ID_CODEC).orElse(DEFAULT_COLLAR_COLOR)); @@ -122,7 +114,7 @@ index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cdd this.readPersistentAngerSaveData(this.level(), input); input.read("sound_variant", ResourceKey.codec(Registries.WOLF_SOUND_VARIANT)) .flatMap(resourceKey -> this.registryAccess().lookupOrThrow(Registries.WOLF_SOUND_VARIANT).get((ResourceKey)resourceKey)) -@@ -269,6 +340,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -266,6 +_,10 @@ } this.setSoundVariant(WolfSoundVariants.pickRandomSoundVariant(this.registryAccess(), level.getRandom())); @@ -133,7 +125,7 @@ index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cdd return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } -@@ -319,6 +394,11 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -316,6 +_,11 @@ public void tick() { super.tick(); if (this.isAlive()) { @@ -145,7 +137,7 @@ index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cdd this.interestedAngleO = this.interestedAngle; if (this.isInterested()) { this.interestedAngle = this.interestedAngle + (1.0F - this.interestedAngle) * 0.4F; -@@ -520,13 +600,27 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -517,13 +_,27 @@ itemInHand.consume(1, player); this.tryToTame(player); return InteractionResult.SUCCESS_SERVER; @@ -169,8 +161,8 @@ index 752e20872725fc11d0f7d8f1d5e7fad87f01db28..9f79615cda890d5823fda94bad5b8cdd } private void tryToTame(Player player) { -- if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit - added event call and isCancelled check. -+ if (((this.level().purpurConfig.alwaysTameInCreative && player.hasInfiniteMaterials()) || this.random.nextInt(3) == 0) && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit - added event call and isCancelled check. // Purpur - Config to always tame in Creative +- if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit - added event call ++ if (((this.level().purpurConfig.alwaysTameInCreative && player.hasInfiniteMaterials()) || this.random.nextInt(3) == 0) && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit - added event call // Purpur - Config to always tame in Creative this.tame(player); this.navigation.stop(); this.setTarget(null); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch similarity index 84% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch index a40c502e4..b58f13a85 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java -index 4fc773a0cb9d68e22e4d6cc7d819196a6cabf4f1..9503ec9d44a6c0811639b7d0cf504d32fefff58d 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java +++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java -@@ -39,6 +39,24 @@ public class EndCrystal extends Entity { +@@ -39,6 +_,24 @@ this.setPos(x, y, z); } @@ -33,7 +25,7 @@ index 4fc773a0cb9d68e22e4d6cc7d819196a6cabf4f1..9503ec9d44a6c0811639b7d0cf504d32 @Override protected Entity.MovementEmission getMovementEmission() { return Entity.MovementEmission.NONE; -@@ -75,6 +93,8 @@ public class EndCrystal extends Entity { +@@ -75,6 +_,8 @@ } } // Paper end - Fix invulnerable end crystals @@ -42,7 +34,7 @@ index 4fc773a0cb9d68e22e4d6cc7d819196a6cabf4f1..9503ec9d44a6c0811639b7d0cf504d32 } @Override -@@ -115,15 +135,17 @@ public class EndCrystal extends Entity { +@@ -115,15 +_,17 @@ } // CraftBukkit end if (!damageSource.is(DamageTypeTags.IS_EXPLOSION)) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch similarity index 52% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch index c69e4248a..ca3634fcb 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 465674ed712667a72e532cc62b11e93433cfdac6..14216ad9e1182dd9c380c79b1f1f3926ad6f458b 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -962,6 +962,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -957,6 +_,7 @@ @Override protected boolean canRide(Entity entity) { @@ -16,8 +8,8 @@ index 465674ed712667a72e532cc62b11e93433cfdac6..14216ad9e1182dd9c380c79b1f1f3926 return false; } -@@ -997,7 +998,7 @@ public class EnderDragon extends Mob implements Enemy { - boolean flag = level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT); +@@ -992,7 +_,7 @@ + boolean flag = level.getGameRules().get(GameRules.MOB_DROPS); int i = 500; - if (this.dragonFight != null && !this.dragonFight.hasPreviouslyKilledDragon()) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch similarity index 76% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch index d0eb27f79..219e4e227 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java -index 6d304da949f271cf41cf5897e08afd936fdf7bed..d94d1d673dbb69742203119d1ef6bf0404efaada 100644 --- a/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -80,6 +80,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -80,6 +_,7 @@ private static final TargetingConditions.Selector LIVING_ENTITY_SELECTOR = (entity, level) -> !entity.getType().is(EntityTypeTags.WITHER_FRIENDS) && entity.attackable(); private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0).selector(LIVING_ENTITY_SELECTOR); @@ -16,7 +8,7 @@ index 6d304da949f271cf41cf5897e08afd936fdf7bed..d94d1d673dbb69742203119d1ef6bf04 public WitherBoss(EntityType type, Level level) { super(type, level); -@@ -88,6 +89,17 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -88,6 +_,17 @@ this.xpReward = 50; } @@ -34,7 +26,7 @@ index 6d304da949f271cf41cf5897e08afd936fdf7bed..d94d1d673dbb69742203119d1ef6bf04 @Override protected PathNavigation createNavigation(Level level) { FlyingPathNavigation flyingPathNavigation = new FlyingPathNavigation(this, level); -@@ -120,6 +132,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -120,6 +_,7 @@ protected void addAdditionalSaveData(ValueOutput output) { super.addAdditionalSaveData(output); output.putInt("Invul", this.getInvulnerableTicks()); @@ -42,7 +34,7 @@ index 6d304da949f271cf41cf5897e08afd936fdf7bed..d94d1d673dbb69742203119d1ef6bf04 } @Override -@@ -129,6 +142,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -129,6 +_,7 @@ if (this.hasCustomName()) { this.bossEvent.setName(this.getDisplayName()); } @@ -50,7 +42,7 @@ index 6d304da949f271cf41cf5897e08afd936fdf7bed..d94d1d673dbb69742203119d1ef6bf04 } @Override -@@ -272,7 +286,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -272,7 +_,7 @@ level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); } // CraftBukkit end @@ -59,7 +51,7 @@ index 6d304da949f271cf41cf5897e08afd936fdf7bed..d94d1d673dbb69742203119d1ef6bf04 // CraftBukkit start - Use relative location for far away sounds // level.globalLevelEvent(1023, this.blockPosition(), 0); int viewDistance = level.getCraftServer().getViewDistance() * 16; -@@ -379,8 +393,10 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -379,8 +_,10 @@ } } @@ -72,7 +64,7 @@ index 6d304da949f271cf41cf5897e08afd936fdf7bed..d94d1d673dbb69742203119d1ef6bf04 } this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth()); -@@ -577,6 +593,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -577,6 +_,7 @@ @Override protected boolean canRide(Entity entity) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch similarity index 76% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch index 2d4089964..035025719 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java -index 15479a9fc47cca3d6627b42c31ba8ff114bbe362..f329459ad97ed4ea5297455d4741d008acb32750 100644 --- a/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -92,10 +92,13 @@ public class ArmorStand extends LivingEntity { +@@ -92,10 +_,13 @@ public boolean canTickSetByAPI = false; private boolean noTickEquipmentDirty = false; // Paper end - Allow ArmorStands not to tick @@ -22,7 +14,7 @@ index 15479a9fc47cca3d6627b42c31ba8ff114bbe362..f329459ad97ed4ea5297455d4741d008 } public ArmorStand(Level level, double x, double y, double z) { -@@ -522,6 +525,7 @@ public class ArmorStand extends LivingEntity { +@@ -522,6 +_,7 @@ // Paper start - Allow ArmorStands not to tick @Override public void tick() { @@ -30,7 +22,7 @@ index 15479a9fc47cca3d6627b42c31ba8ff114bbe362..f329459ad97ed4ea5297455d4741d008 if (!this.canTick) { if (this.noTickEquipmentDirty) { this.noTickEquipmentDirty = false; -@@ -812,4 +816,18 @@ public class ArmorStand extends LivingEntity { +@@ -810,4 +_,18 @@ } } // Paper end diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/item/ItemEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/item/ItemEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch index 07f13273d..9a7d5bb73 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/item/ItemEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index 6be576368695c902a0d6da74b1d77d3018b4585a..8153c870c0c822792ffbb0fa1ae96b201a1444e3 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -56,6 +56,12 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -54,6 +_,12 @@ public boolean canMobPickup = true; // Paper - Item#canEntityPickup private int despawnRate = -1; // Paper - Alternative item-despawn-rate public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API @@ -21,7 +13,7 @@ index 6be576368695c902a0d6da74b1d77d3018b4585a..8153c870c0c822792ffbb0fa1ae96b20 public ItemEntity(EntityType type, Level level) { super(type, level); -@@ -333,7 +339,16 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -330,7 +_,16 @@ @Override public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { @@ -37,9 +29,9 @@ index 6be576368695c902a0d6da74b1d77d3018b4585a..8153c870c0c822792ffbb0fa1ae96b20 + } else if (this.isInvulnerableToBase(damageSource)) { + // Purpur end - Item entity immunities return false; - } else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { + } else if (!level.getGameRules().get(GameRules.MOB_GRIEFING) && damageSource.getEntity() instanceof Mob) { return false; -@@ -512,6 +527,12 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -508,6 +_,12 @@ public void setItem(ItemStack stack) { this.getEntityData().set(DATA_ITEM, stack); this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper - Alternative item-despawn-rate diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/item/PrimedTnt.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/item/PrimedTnt.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch index ed401803c..a3308c373 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/item/PrimedTnt.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java -index c685b5123c88fc73c26a3ba31225ab1226e52702..b988aa11c403a1b520ec5630f2f11593c7507a05 100644 --- a/net/minecraft/world/entity/item/PrimedTnt.java +++ b/net/minecraft/world/entity/item/PrimedTnt.java -@@ -238,4 +238,32 @@ public class PrimedTnt extends Entity implements TraceableEntity { +@@ -235,4 +_,32 @@ return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid(); } // Paper end - Option to prevent TNT from moving in water diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Creeper.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch similarity index 86% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Creeper.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch index 9c9456c69..616f3be1d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Creeper.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java -index 10d8975a229c000c1610f4927358fa44bae40c23..c3386bd6028a9391d2eb00567b711f89b4585608 100644 --- a/net/minecraft/world/entity/monster/Creeper.java +++ b/net/minecraft/world/entity/monster/Creeper.java -@@ -56,6 +56,7 @@ public class Creeper extends Monster { +@@ -56,6 +_,7 @@ public int explosionRadius = 3; public boolean droppedSkulls; public @Nullable Entity entityIgniter; // CraftBukkit @@ -16,7 +8,7 @@ index 10d8975a229c000c1610f4927358fa44bae40c23..c3386bd6028a9391d2eb00567b711f89 public Creeper(EntityType type, Level level) { super(type, level); -@@ -159,6 +160,27 @@ public class Creeper extends Monster { +@@ -159,6 +_,27 @@ return false; // CraftBukkit } @@ -44,7 +36,7 @@ index 10d8975a229c000c1610f4927358fa44bae40c23..c3386bd6028a9391d2eb00567b711f89 @Override public SoundEvent getHurtSound(DamageSource damageSource) { return SoundEvents.CREEPER_HURT; -@@ -243,14 +265,16 @@ public class Creeper extends Monster { +@@ -243,14 +_,16 @@ } public void explodeCreeper() { @@ -63,7 +55,7 @@ index 10d8975a229c000c1610f4927358fa44bae40c23..c3386bd6028a9391d2eb00567b711f89 this.spawnLingeringCloud(); this.triggerOnDeathMobEffects(serverLevel, Entity.RemovalReason.KILLED); this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause -@@ -261,6 +285,7 @@ public class Creeper extends Monster { +@@ -261,6 +_,7 @@ } // CraftBukkit end } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/EnderMan.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch similarity index 79% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/EnderMan.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch index e834b9207..7479b47dc 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/EnderMan.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java -index 9b63c55a61b511ebad6c94b48926cfdf544b0449..87aaa6cd478d8d635b625d1a98bce23d577fb33a 100644 --- a/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java -@@ -102,7 +102,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -101,7 +_,7 @@ this.goalSelector.addGoal(11, new EnderMan.EndermanTakeBlockGoal(this)); this.targetSelector.addGoal(1, new EnderMan.EndermanLookForPlayerGoal(this, this::isAngryAt)); this.targetSelector.addGoal(2, new HurtByTargetGoal(this)); @@ -17,7 +9,7 @@ index 9b63c55a61b511ebad6c94b48926cfdf544b0449..87aaa6cd478d8d635b625d1a98bce23d this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false)); } -@@ -222,7 +222,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -220,7 +_,7 @@ boolean isBeingStaredBy(Player player) { // Paper start - EndermanAttackPlayerEvent @@ -26,7 +18,7 @@ index 9b63c55a61b511ebad6c94b48926cfdf544b0449..87aaa6cd478d8d635b625d1a98bce23d final com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent event = new com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent((org.bukkit.entity.Enderman) getBukkitEntity(), (org.bukkit.entity.Player) player.getBukkitEntity()); event.setCancelled(!shouldAttack); return event.callEvent(); -@@ -378,6 +378,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -375,6 +_,7 @@ public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isInvulnerableTo(level, damageSource)) { return false; @@ -34,7 +26,7 @@ index 9b63c55a61b511ebad6c94b48926cfdf544b0449..87aaa6cd478d8d635b625d1a98bce23d } else { AbstractThrownPotion abstractThrownPotion1 = damageSource.getDirectEntity() instanceof AbstractThrownPotion abstractThrownPotion ? abstractThrownPotion -@@ -394,6 +395,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -391,6 +_,7 @@ } else { boolean flag = abstractThrownPotion1 != null && this.hurtWithCleanWater(level, damageSource, abstractThrownPotion1, amount); @@ -42,7 +34,7 @@ index 9b63c55a61b511ebad6c94b48926cfdf544b0449..87aaa6cd478d8d635b625d1a98bce23d if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent for (int i = 0; i < 64; i++) { if (this.teleport()) { -@@ -437,7 +439,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -434,7 +_,7 @@ @Override public boolean requiresCustomPersistence() { @@ -51,19 +43,19 @@ index 9b63c55a61b511ebad6c94b48926cfdf544b0449..87aaa6cd478d8d635b625d1a98bce23d } static class EndermanFreezeWhenLookedAt extends Goal { -@@ -481,6 +483,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -477,6 +_,7 @@ @Override public boolean canUse() { + if (!enderman.level().purpurConfig.endermanAllowGriefing) return false; // Purpur - Add enderman and creeper griefing controls return this.enderman.getCarriedBlock() != null - && getServerLevel(this.enderman).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) + && getServerLevel(this.enderman).getGameRules().get(GameRules.MOB_GRIEFING) && this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0; -@@ -630,6 +633,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -625,6 +_,7 @@ @Override public boolean canUse() { + if (!enderman.level().purpurConfig.endermanAllowGriefing) return false; // Purpur - Add enderman and creeper griefing controls return this.enderman.getCarriedBlock() == null - && getServerLevel(this.enderman).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) + && getServerLevel(this.enderman).getGameRules().get(GameRules.MOB_GRIEFING) && this.enderman.getRandom().nextInt(reducedTickDelay(20)) == 0; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Endermite.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch similarity index 74% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Endermite.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch index d28f4ab84..a399138fa 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Endermite.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Endermite.java b/net/minecraft/world/entity/monster/Endermite.java -index cabf4d06ede5ea155fea5a0d7a17e67c0de8754f..980ec0e45581812c027bb2ce8cd25d74e5f10663 100644 --- a/net/minecraft/world/entity/monster/Endermite.java +++ b/net/minecraft/world/entity/monster/Endermite.java -@@ -30,12 +30,23 @@ public class Endermite extends Monster { +@@ -30,12 +_,23 @@ private static final int MAX_LIFE = 2400; private static final int DEFAULT_LIFE = 0; public int life = 0; @@ -32,7 +24,7 @@ index cabf4d06ede5ea155fea5a0d7a17e67c0de8754f..980ec0e45581812c027bb2ce8cd25d74 @Override protected void registerGoals() { this.goalSelector.addGoal(1, new FloatGoal(this)); -@@ -81,12 +92,14 @@ public class Endermite extends Monster { +@@ -81,12 +_,14 @@ protected void readAdditionalSaveData(ValueInput input) { super.readAdditionalSaveData(input); this.life = input.getIntOr("Lifetime", 0); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Ghast.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ghast.java.patch similarity index 61% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Ghast.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ghast.java.patch index 77130f05b..c05e83d84 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Ghast.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ghast.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Ghast.java b/net/minecraft/world/entity/monster/Ghast.java -index 8f9a299d9e448fad46fa704542a909f6bb90e713..9954f5173c427d8c61e283d9bb2dac42c296f357 100644 --- a/net/minecraft/world/entity/monster/Ghast.java +++ b/net/minecraft/world/entity/monster/Ghast.java -@@ -156,6 +156,11 @@ public class Ghast extends Mob implements Enemy { +@@ -156,6 +_,11 @@ public static boolean checkGhastSpawnRules( EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Guardian.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Guardian.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Guardian.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Guardian.java.patch index e1c201197..c85899c80 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Guardian.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Guardian.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Guardian.java b/net/minecraft/world/entity/monster/Guardian.java -index c907feb2ab6862d980f89f6341402131a8a966f2..cd802866af8ed2d0ebd5f8dabe170848cbf4638a 100644 --- a/net/minecraft/world/entity/monster/Guardian.java +++ b/net/minecraft/world/entity/monster/Guardian.java -@@ -315,6 +315,11 @@ public class Guardian extends Monster { +@@ -312,6 +_,11 @@ public static boolean checkGuardianSpawnRules( EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/MagmaCube.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/MagmaCube.java.patch similarity index 58% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/MagmaCube.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/MagmaCube.java.patch index 53eb6bd47..358fa1924 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/MagmaCube.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/MagmaCube.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/MagmaCube.java b/net/minecraft/world/entity/monster/MagmaCube.java -index 034a41573c330b2366fb305bb0796293d5d6a187..2323a7315878e38710f8f31f7806ebda94077067 100644 --- a/net/minecraft/world/entity/monster/MagmaCube.java +++ b/net/minecraft/world/entity/monster/MagmaCube.java -@@ -31,6 +31,11 @@ public class MagmaCube extends Slime { +@@ -31,6 +_,11 @@ public static boolean checkMagmaCubeSpawnRules( EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Monster.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Monster.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Monster.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Monster.java.patch index f472e4d88..6db59e5bc 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Monster.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Monster.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Monster.java b/net/minecraft/world/entity/monster/Monster.java -index e792298d50ed7b7112f862d3b820a03fd9b05550..7c420f567f7841f45acd91b9749cab150397f5e2 100644 --- a/net/minecraft/world/entity/monster/Monster.java +++ b/net/minecraft/world/entity/monster/Monster.java -@@ -84,6 +84,11 @@ public abstract class Monster extends PathfinderMob implements Enemy { +@@ -84,6 +_,11 @@ } public static boolean isDarkEnoughToSpawn(ServerLevelAccessor level, BlockPos pos, RandomSource random) { @@ -20,7 +12,7 @@ index e792298d50ed7b7112f862d3b820a03fd9b05550..7c420f567f7841f45acd91b9749cab15 if (level.getBrightness(LightLayer.SKY, pos) > random.nextInt(32)) { return false; } else { -@@ -109,6 +114,11 @@ public abstract class Monster extends PathfinderMob implements Enemy { +@@ -109,6 +_,11 @@ public static boolean checkAnyLightMonsterSpawnRules( EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { @@ -32,7 +24,7 @@ index e792298d50ed7b7112f862d3b820a03fd9b05550..7c420f567f7841f45acd91b9749cab15 return level.getDifficulty() != Difficulty.PEACEFUL && checkMobSpawnRules(entityType, level, spawnReason, pos, random); } -@@ -140,4 +150,12 @@ public abstract class Monster extends PathfinderMob implements Enemy { +@@ -146,4 +_,12 @@ return ItemStack.EMPTY; } } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Phantom.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Phantom.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch index 713252b0d..9f60b3712 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Phantom.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java -index b0f0a70ef6d708917ac8278c7eebd81d1fd7df6a..7da7dfaf400e69434417f6f85d5d021235d11162 100644 --- a/net/minecraft/world/entity/monster/Phantom.java +++ b/net/minecraft/world/entity/monster/Phantom.java -@@ -170,7 +170,11 @@ public class Phantom extends Mob implements Enemy { +@@ -166,7 +_,11 @@ ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { this.anchorPoint = this.blockPosition().above(5); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Ravager.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Ravager.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch index 5eaa73e47..53048f5a2 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Ravager.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Ravager.java b/net/minecraft/world/entity/monster/Ravager.java -index 1686abac483f319d958079e8c4617c4d74a0c4af..da20eb6eaadd9468fcc96f022d67d4583371d717 100644 --- a/net/minecraft/world/entity/monster/Ravager.java +++ b/net/minecraft/world/entity/monster/Ravager.java -@@ -75,6 +75,7 @@ public class Ravager extends Raider { +@@ -76,6 +_,7 @@ protected void registerGoals() { super.registerGoals(); this.goalSelector.addGoal(0, new FloatGoal(this)); @@ -16,7 +8,7 @@ index 1686abac483f319d958079e8c4617c4d74a0c4af..da20eb6eaadd9468fcc96f022d67d458 this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0, true)); this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 0.4)); this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F)); -@@ -155,7 +156,7 @@ public class Ravager extends Raider { +@@ -154,7 +_,7 @@ )) { BlockState blockState = serverLevel.getBlockState(blockPos); Block block = blockState.getBlock(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Shulker.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch similarity index 83% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Shulker.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch index b273fc2bb..21c6840c6 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Shulker.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Shulker.java b/net/minecraft/world/entity/monster/Shulker.java -index 7c56d3d5d24d25c4d70a19be256b5cbe9374f09f..d0bcd2d1f7afd4a01c9a0f7d66082df38db50edd 100644 --- a/net/minecraft/world/entity/monster/Shulker.java +++ b/net/minecraft/world/entity/monster/Shulker.java -@@ -94,6 +94,21 @@ public class Shulker extends AbstractGolem implements Enemy { +@@ -93,6 +_,21 @@ this.lookControl = new Shulker.ShulkerLookControl(this); } @@ -30,7 +22,7 @@ index 7c56d3d5d24d25c4d70a19be256b5cbe9374f09f..d0bcd2d1f7afd4a01c9a0f7d66082df3 @Override protected void registerGoals() { this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F, 0.02F, true)); -@@ -457,11 +472,21 @@ public class Shulker extends AbstractGolem implements Enemy { +@@ -454,11 +_,21 @@ private void hitByShulkerBullet() { Vec3 vec3 = this.position(); AABB boundingBox = this.getBoundingBox(); @@ -56,7 +48,7 @@ index 7c56d3d5d24d25c4d70a19be256b5cbe9374f09f..d0bcd2d1f7afd4a01c9a0f7d66082df3 if (shulker != null) { shulker.setVariant(this.getVariant()); shulker.snapTo(vec3); -@@ -569,7 +594,7 @@ public class Shulker extends AbstractGolem implements Enemy { +@@ -565,7 +_,7 @@ } public Optional getVariant() { @@ -64,4 +56,4 @@ index 7c56d3d5d24d25c4d70a19be256b5cbe9374f09f..d0bcd2d1f7afd4a01c9a0f7d66082df3 + return Optional.ofNullable(this.level().purpurConfig.shulkerSpawnFromBulletRandomColor ? DyeColor.random(this.level().random) : this.getColor()); // Purpur - Shulker spawn from bullet options } - @Nullable + public @Nullable DyeColor getColor() { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Slime.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Slime.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Slime.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Slime.java.patch index 8f51138fd..7963b593d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Slime.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Slime.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Slime.java b/net/minecraft/world/entity/monster/Slime.java -index 6a4bdf6e8e785460c864552f21116dec8c545bd6..7abd42fa34c80e868875f0ff3986a85d1a6dcb8c 100644 --- a/net/minecraft/world/entity/monster/Slime.java +++ b/net/minecraft/world/entity/monster/Slime.java -@@ -301,6 +301,11 @@ public class Slime extends Mob implements Enemy { +@@ -302,6 +_,11 @@ public static boolean checkSlimeSpawnRules( EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Strider.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Strider.java.patch similarity index 68% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Strider.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Strider.java.patch index 32705c91a..86f2a97ff 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Strider.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Strider.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Strider.java b/net/minecraft/world/entity/monster/Strider.java -index 402723c86ffb8da0f4ed5529a762d2eed151e73e..312564fcaf91280d70e379994bd9d8fcb54b0a40 100644 --- a/net/minecraft/world/entity/monster/Strider.java +++ b/net/minecraft/world/entity/monster/Strider.java -@@ -393,6 +393,18 @@ public class Strider extends Animal implements ItemSteerable { +@@ -390,6 +_,18 @@ @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { boolean isFood = this.isFood(player.getItemInHand(hand)); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch similarity index 57% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch index dee1c3ac3..0034248ca 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index a60f40c7986bbcec854df490bd66111a79fc635a..56a1e933b4b135890bec5104ef9f3cdf21ac2ff6 100644 --- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -201,6 +201,11 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -202,6 +_,11 @@ public static boolean checkHoglinSpawnRules( EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/illager/Vindicator.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/illager/Vindicator.java.patch new file mode 100644 index 000000000..a79df0bf1 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/illager/Vindicator.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/world/entity/monster/illager/Vindicator.java ++++ b/net/minecraft/world/entity/monster/illager/Vindicator.java +@@ -131,6 +_,11 @@ + RandomSource random = level.getRandom(); + this.populateDefaultEquipmentSlots(random, difficulty); + this.populateDefaultEquipmentEnchantments(level, random, difficulty); ++ // Purpur start - Special mobs naturally spawn ++ if (level().purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= level().purpurConfig.vindicatorJohnnySpawnChance) { ++ setCustomName(Component.translatable("Johnny")); ++ } ++ // Purpur end - Special mobs naturally spawn + return spawnGroupData1; + } + diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch similarity index 55% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch index 46b903c7f..b8e4bf183 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java -index fbbf7364b07ea49116dd86fa9722fa341978bc19..072358efcc92f510d5281b7f37f8c36df85c2e4c 100644 --- a/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -203,6 +203,11 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -208,6 +_,11 @@ public static boolean checkPiglinSpawnRules( EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch similarity index 72% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch index 8eaa1f45e..931363770 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/net/minecraft/world/entity/monster/piglin/PiglinAi.java -index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..2841c765b2bd804f08bd0e603b4b29cf8a801fab 100644 --- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java -@@ -661,7 +661,10 @@ public class PiglinAi { +@@ -667,13 +_,23 @@ public static boolean isWearingSafeArmor(LivingEntity entity) { for (EquipmentSlot equipmentSlot : EquipmentSlotGroup.ARMOR) { @@ -20,17 +12,16 @@ index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..2841c765b2bd804f08bd0e603b4b29cf return true; } } -@@ -669,6 +672,13 @@ public class PiglinAi { + return false; } - ++ + // Purpur start - piglins ignore gold-trimmed armor + private static boolean isWearingGoldTrim(net.minecraft.world.item.ItemStack itemstack) { + net.minecraft.world.item.equipment.trim.ArmorTrim armorTrim = itemstack.getComponents().get(net.minecraft.core.component.DataComponents.TRIM); + return armorTrim != null && armorTrim.material().is(net.minecraft.world.item.equipment.trim.TrimMaterials.GOLD); + } + // Purpur end - piglins ignore gold-trimmed armor -+ + private static void stopWalking(Piglin piglin) { piglin.getBrain().eraseMemory(MemoryModuleType.WALK_TARGET); - piglin.getNavigation().stop(); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/skeleton/AbstractSkeleton.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/skeleton/AbstractSkeleton.java.patch new file mode 100644 index 000000000..e5dcc11bf --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/skeleton/AbstractSkeleton.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/entity/monster/skeleton/AbstractSkeleton.java ++++ b/net/minecraft/world/entity/monster/skeleton/AbstractSkeleton.java +@@ -137,7 +_,7 @@ + this.populateDefaultEquipmentEnchantments(level, random, difficulty); + this.reassessWeaponGoal(); + this.setCanPickUpLoot(level.getLevel().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || random.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot +- if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty() && SpecialDates.isHalloween() && random.nextFloat() < 0.25F) { ++ if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty() && (level.getLevel().purpurConfig.forceHalloweenSeason || SpecialDates.isHalloween()) && random.nextFloat() < this.level().purpurConfig.chanceHeadHalloweenOnEntity) { // Purpur - Halloween options and optimizations + this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); + this.setDropChance(EquipmentSlot.HEAD, 0.0F); + } +@@ -184,7 +_,7 @@ + double squareRoot = Math.sqrt(d * d + d2 * d2); + if (this.level() instanceof ServerLevel serverLevel) { + Projectile.Delayed delayedEntity = Projectile.spawnProjectileUsingShootDelayed( // Paper - delayed +- arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, 14 - serverLevel.getDifficulty().getId() * 4 ++ arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, serverLevel.purpurConfig.skeletonBowAccuracyMap.getOrDefault(serverLevel.getDifficulty().getId(), (float) (14 - serverLevel.getDifficulty().getId() * 4)) // Purpur - skeleton bow accuracy option + ); + + // Paper start - call EntityShootBowEvent diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Skeleton.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/skeleton/Skeleton.java.patch similarity index 84% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Skeleton.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/skeleton/Skeleton.java.patch index ab396cf37..5982e0484 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Skeleton.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/skeleton/Skeleton.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Skeleton.java b/net/minecraft/world/entity/monster/Skeleton.java -index 37a60cf7b00adaadbca129659b3aea3d8f10c4e2..fb0aa6f0713f6ab1d26711d3fce920de91deb980 100644 ---- a/net/minecraft/world/entity/monster/Skeleton.java -+++ b/net/minecraft/world/entity/monster/Skeleton.java -@@ -130,4 +130,64 @@ public class Skeleton extends AbstractSkeleton { +--- a/net/minecraft/world/entity/monster/skeleton/Skeleton.java ++++ b/net/minecraft/world/entity/monster/skeleton/Skeleton.java +@@ -130,4 +_,64 @@ SoundEvent getStepSound() { return SoundEvents.SKELETON_STEP; } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/warden/WardenAi.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/warden/WardenAi.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/warden/WardenAi.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/warden/WardenAi.java.patch index a5864d626..6c45d2405 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/warden/WardenAi.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/warden/WardenAi.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/warden/WardenAi.java b/net/minecraft/world/entity/monster/warden/WardenAi.java -index b1bca206a880f763c5e9234a20943e9918889b44..5fc0c82231f3407199f1bf0db8ac278e4b29d1e2 100644 --- a/net/minecraft/world/entity/monster/warden/WardenAi.java +++ b/net/minecraft/world/entity/monster/warden/WardenAi.java -@@ -175,15 +175,16 @@ public class WardenAi { +@@ -175,15 +_,16 @@ brain.addActivityAndRemoveMemoryWhenStopped( Activity.FIGHT, 10, diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Drowned.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/Drowned.java.patch similarity index 79% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Drowned.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/Drowned.java.patch index 4000e13bd..2f3581f1e 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Drowned.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/Drowned.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java -index 26464ff611adaf80e7685b883ec1f7ac4f75db82..6c51ecee06538de51ce02ea73e173a766ce8515c 100644 ---- a/net/minecraft/world/entity/monster/Drowned.java -+++ b/net/minecraft/world/entity/monster/Drowned.java -@@ -83,10 +83,23 @@ public class Drowned extends Zombie implements RangedAttackMob { +--- a/net/minecraft/world/entity/monster/zombie/Drowned.java ++++ b/net/minecraft/world/entity/monster/zombie/Drowned.java +@@ -86,10 +_,23 @@ this.goalSelector.addGoal(2, new Drowned.DrownedAttackGoal(this, 1.0, false)); this.goalSelector.addGoal(5, new Drowned.DrownedGoToBeachGoal(this, 1.0)); this.goalSelector.addGoal(6, new Drowned.DrownedSwimUpGoal(this, 1.0, this.level().getSeaLevel())); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Zombie.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/Zombie.java.patch similarity index 54% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Zombie.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/Zombie.java.patch index 7e965f461..375b49003 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Zombie.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/Zombie.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index afe4a2304268224f6b0a1cc40a41f7b67f9d3275..81e9e2d87e8ea4645ee95559a08c765c1d96a65a 100644 ---- a/net/minecraft/world/entity/monster/Zombie.java -+++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -117,7 +117,19 @@ public class Zombie extends Monster { +--- a/net/minecraft/world/entity/monster/zombie/Zombie.java ++++ b/net/minecraft/world/entity/monster/zombie/Zombie.java +@@ -118,7 +_,19 @@ this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0)); this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers(ZombifiedPiglin.class)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); @@ -29,15 +21,12 @@ index afe4a2304268224f6b0a1cc40a41f7b67f9d3275..81e9e2d87e8ea4645ee95559a08c765c this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true)); this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR)); } -@@ -551,10 +563,7 @@ public class Zombie extends Monster { +@@ -524,7 +_,7 @@ + } } - if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { -- LocalDate localDate = LocalDate.now(); -- int i = localDate.get(ChronoField.DAY_OF_MONTH); -- int i1 = localDate.get(ChronoField.MONTH_OF_YEAR); -- if (i1 == 10 && i == 31 && random.nextFloat() < 0.25F) { -+ if (net.minecraft.world.entity.ambient.Bat.isHalloweenSeason(level.getMinecraftWorld()) && this.random.nextFloat() < this.level().purpurConfig.chanceHeadHalloweenOnEntity) { // Purpur - Halloween options and optimizations - this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); - this.setDropChance(EquipmentSlot.HEAD, 0.0F); - } +- if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty() && SpecialDates.isHalloween() && random.nextFloat() < 0.25F) { ++ if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty() && (level.getLevel().purpurConfig.forceHalloweenSeason || SpecialDates.isHalloween()) && random.nextFloat() < level.getLevel().purpurConfig.chanceHeadHalloweenOnEntity) { // Purpur - Halloween options and optimizations + this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); + this.setDropChance(EquipmentSlot.HEAD, 0.0F); + } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/ZombieVillager.java.patch similarity index 60% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/ZombieVillager.java.patch index 58931580d..0a695a1e8 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/ZombieVillager.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java -index c7148075df2c80f2172ce5e5b490fc89787cc338..e9cf8809fffaba98e352c6d47719a816aad4cce4 100644 ---- a/net/minecraft/world/entity/monster/ZombieVillager.java -+++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -140,10 +140,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +--- a/net/minecraft/world/entity/monster/zombie/ZombieVillager.java ++++ b/net/minecraft/world/entity/monster/zombie/ZombieVillager.java +@@ -137,10 +_,10 @@ public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemInHand = player.getItemInHand(hand); if (itemInHand.is(Items.GOLDEN_APPLE)) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java.patch similarity index 66% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java.patch index 57efaa1f3..0dae756c2 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -index d862e16f24a11e52d6d454bbf330bce4abe96db4..08997d05ff75f68cd36c90eb8730dc44a052d5b8 100644 ---- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java -+++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -@@ -113,6 +113,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +--- a/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java ++++ b/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java +@@ -109,6 +_,12 @@ this.maybeAlertOthers(); } @@ -21,7 +13,7 @@ index d862e16f24a11e52d6d454bbf330bce4abe96db4..08997d05ff75f68cd36c90eb8730dc44 super.customServerAiStep(level); } -@@ -160,6 +166,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -156,6 +_,12 @@ this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random); } @@ -34,7 +26,7 @@ index d862e16f24a11e52d6d454bbf330bce4abe96db4..08997d05ff75f68cd36c90eb8730dc44 return super.setTarget(target, reason); // CraftBukkit } -@@ -180,6 +192,11 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -176,6 +_,11 @@ public static boolean checkZombifiedPiglinSpawnRules( EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/CatSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/CatSpawner.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/CatSpawner.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/CatSpawner.java.patch index d6df3ea10..6d573d3e2 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/CatSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/CatSpawner.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/npc/CatSpawner.java b/net/minecraft/world/entity/npc/CatSpawner.java -index 08e91aab23f326213538bd97f28cbc818770eb04..554c4dbc36040bdcfb973d5826da1448fa09725c 100644 --- a/net/minecraft/world/entity/npc/CatSpawner.java +++ b/net/minecraft/world/entity/npc/CatSpawner.java -@@ -23,7 +23,7 @@ public class CatSpawner implements CustomSpawner { +@@ -23,7 +_,7 @@ public void tick(ServerLevel level, boolean spawnEnemies) { this.nextTick--; if (this.nextTick <= 0) { @@ -17,7 +9,7 @@ index 08e91aab23f326213538bd97f28cbc818770eb04..554c4dbc36040bdcfb973d5826da1448 Player randomPlayer = level.getRandomPlayer(); if (randomPlayer != null) { RandomSource randomSource = level.random; -@@ -45,9 +45,12 @@ public class CatSpawner implements CustomSpawner { +@@ -45,9 +_,12 @@ } private void spawnInVillage(ServerLevel level, BlockPos pos) { @@ -33,7 +25,7 @@ index 08e91aab23f326213538bd97f28cbc818770eb04..554c4dbc36040bdcfb973d5826da1448 if (entitiesOfClass.size() < 5) { this.spawnCat(pos, level, false); } -@@ -55,8 +58,11 @@ public class CatSpawner implements CustomSpawner { +@@ -55,8 +_,11 @@ } private void spawnInHut(ServerLevel level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/Villager.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/villager/Villager.java.patch similarity index 83% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/Villager.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/villager/Villager.java.patch index 698a66cd5..5b50dccc3 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/Villager.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/villager/Villager.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index d10a407bef7da29a24582e48d8ee599c981384c5..be8200024a766d338705ece9a7fe0cced53a299a 100644 ---- a/net/minecraft/world/entity/npc/Villager.java -+++ b/net/minecraft/world/entity/npc/Villager.java -@@ -179,6 +179,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +--- a/net/minecraft/world/entity/npc/villager/Villager.java ++++ b/net/minecraft/world/entity/npc/villager/Villager.java +@@ -179,6 +_,8 @@ MemoryModuleType.MEETING_POINT, (villager, poiType) -> poiType.is(PoiTypes.MEETING) ); @@ -17,7 +9,7 @@ index d10a407bef7da29a24582e48d8ee599c981384c5..be8200024a766d338705ece9a7fe0cce public Villager(EntityType type, Level level) { this(type, level, VillagerType.PLAINS); -@@ -197,6 +199,57 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -197,6 +_,57 @@ this.setVillagerData(this.getVillagerData().withType(villagerType).withProfession(level.registryAccess(), VillagerProfession.NONE)); } @@ -75,7 +67,7 @@ index d10a407bef7da29a24582e48d8ee599c981384c5..be8200024a766d338705ece9a7fe0cce @Override public Brain getBrain() { return (Brain)super.getBrain(); -@@ -293,11 +346,22 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -293,11 +_,22 @@ // Paper start - EAR 2 this.customServerAiStep(level, false); } @@ -100,7 +92,7 @@ index d10a407bef7da29a24582e48d8ee599c981384c5..be8200024a766d338705ece9a7fe0cce profilerFiller.pop(); if (this.assignProfessionWhenSpawned) { this.assignProfessionWhenSpawned = false; -@@ -369,6 +433,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -369,6 +_,7 @@ return InteractionResult.CONSUME; } @@ -108,7 +100,7 @@ index d10a407bef7da29a24582e48d8ee599c981384c5..be8200024a766d338705ece9a7fe0cce this.startTrading(player); } -@@ -505,7 +570,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -500,7 +_,7 @@ public void updateDemand() { for (MerchantOffer merchantOffer : this.getOffers()) { @@ -117,7 +109,7 @@ index d10a407bef7da29a24582e48d8ee599c981384c5..be8200024a766d338705ece9a7fe0cce } } -@@ -698,7 +763,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -692,7 +_,7 @@ @Override public boolean canBreed() { @@ -126,7 +118,7 @@ index d10a407bef7da29a24582e48d8ee599c981384c5..be8200024a766d338705ece9a7fe0cce } private boolean hungry() { -@@ -923,6 +988,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -915,6 +_,7 @@ } public void spawnGolemIfNeeded(ServerLevel level, long gameTime, int minVillagerAmount) { @@ -134,7 +126,7 @@ index d10a407bef7da29a24582e48d8ee599c981384c5..be8200024a766d338705ece9a7fe0cce if (this.wantsToSpawnGolem(gameTime)) { AABB aabb = this.getBoundingBox().inflate(10.0, 10.0, 10.0); List entitiesOfClass = level.getEntitiesOfClass(Villager.class, aabb); -@@ -990,6 +1056,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -982,6 +_,12 @@ @Override public void startSleeping(BlockPos pos) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/wanderingtrader/WanderingTrader.java.patch similarity index 64% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/wanderingtrader/WanderingTrader.java.patch index b64807080..373eaf1a9 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/wanderingtrader/WanderingTrader.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java -index 4c7287c4a081b4e1f0049c8c9bdf6a42b51e8274..4032215d5907b926d1a8e08a8b0852c1388b51c5 100644 ---- a/net/minecraft/world/entity/npc/WanderingTrader.java -+++ b/net/minecraft/world/entity/npc/WanderingTrader.java -@@ -60,6 +60,13 @@ public class WanderingTrader extends AbstractVillager implements Consumable.Over +--- a/net/minecraft/world/entity/npc/wanderingtrader/WanderingTrader.java ++++ b/net/minecraft/world/entity/npc/wanderingtrader/WanderingTrader.java +@@ -61,6 +_,13 @@ super(type, level); } @@ -22,7 +14,7 @@ index 4c7287c4a081b4e1f0049c8c9bdf6a42b51e8274..4032215d5907b926d1a8e08a8b0852c1 @Override protected void registerGoals() { this.goalSelector.addGoal(0, new FloatGoal(this)); -@@ -80,7 +87,7 @@ public class WanderingTrader extends AbstractVillager implements Consumable.Over +@@ -81,7 +_,7 @@ this, new ItemStack(Items.MILK_BUCKET), SoundEvents.WANDERING_TRADER_REAPPEARED, @@ -31,7 +23,7 @@ index 4c7287c4a081b4e1f0049c8c9bdf6a42b51e8274..4032215d5907b926d1a8e08a8b0852c1 ) ); this.goalSelector.addGoal(1, new TradeWithPlayerGoal(this)); -@@ -124,8 +131,10 @@ public class WanderingTrader extends AbstractVillager implements Consumable.Over +@@ -124,8 +_,10 @@ return InteractionResult.CONSUME; } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/wanderingtrader/WanderingTraderSpawner.java.patch similarity index 65% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/wanderingtrader/WanderingTraderSpawner.java.patch index 917142f22..505d76d91 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/wanderingtrader/WanderingTraderSpawner.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index aafd89f37492c650fd10b478a353cc8b19d49a3f..3f10af7eb42c60b80f39ab090c65b6c1a089c4e0 100644 ---- a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -+++ b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -@@ -135,7 +135,17 @@ public class WanderingTraderSpawner implements CustomSpawner { +--- a/net/minecraft/world/entity/npc/wanderingtrader/WanderingTraderSpawner.java ++++ b/net/minecraft/world/entity/npc/wanderingtrader/WanderingTraderSpawner.java +@@ -134,7 +_,17 @@ int i1 = pos.getX() + this.random.nextInt(maxDistance * 2) - maxDistance; int i2 = pos.getZ() + this.random.nextInt(maxDistance * 2) - maxDistance; int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i1, i2); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/player/Player.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/player/Player.java.patch similarity index 69% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/player/Player.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/player/Player.java.patch index 5fb80b349..655474e8b 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/player/Player.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/player/Player.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 1c165c5d027899b6e9de8a6b731389dad11fb24c..45fe132e78147bb33d986d8098b6b12567b5398a 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -181,11 +181,20 @@ public abstract class Player extends Avatar implements ContainerUser { +@@ -179,11 +_,20 @@ private int currentImpulseContextResetGraceTime = 0; public boolean affectsSpawning = true; // Paper - Affects Spawning API public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage @@ -29,7 +21,7 @@ index 1c165c5d027899b6e9de8a6b731389dad11fb24c..45fe132e78147bb33d986d8098b6b125 @Override public org.bukkit.craftbukkit.entity.CraftHumanEntity getBukkitEntity() { return (org.bukkit.craftbukkit.entity.CraftHumanEntity) super.getBukkitEntity(); -@@ -247,6 +256,12 @@ public abstract class Player extends Avatar implements ContainerUser { +@@ -245,6 +_,12 @@ @Override public void tick() { @@ -42,7 +34,7 @@ index 1c165c5d027899b6e9de8a6b731389dad11fb24c..45fe132e78147bb33d986d8098b6b125 this.noPhysics = this.isSpectator(); if (this.isSpectator() || this.isPassenger()) { this.setOnGround(false); -@@ -302,6 +317,17 @@ public abstract class Player extends Avatar implements ContainerUser { +@@ -302,6 +_,17 @@ this.turtleHelmetTick(); } @@ -60,7 +52,7 @@ index 1c165c5d027899b6e9de8a6b731389dad11fb24c..45fe132e78147bb33d986d8098b6b125 this.cooldowns.tick(); this.updatePlayerPose(); if (this.currentImpulseContextResetGraceTime > 0) { -@@ -513,7 +539,7 @@ public abstract class Player extends Avatar implements ContainerUser { +@@ -510,7 +_,7 @@ List list = Lists.newArrayList(); for (Entity entity : entities) { @@ -69,22 +61,22 @@ index 1c165c5d027899b6e9de8a6b731389dad11fb24c..45fe132e78147bb33d986d8098b6b125 list.add(entity); } else if (!entity.isRemoved()) { this.touch(entity); -@@ -1075,7 +1101,7 @@ public abstract class Player extends Avatar implements ContainerUser { - flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits - if (flag2) { - damageSource = damageSource.critical(); // Paper - critical damage API -- f *= 1.5F; -+ f *= (float) this.level().purpurConfig.playerCriticalDamageMultiplier; // Purpur - Add config change multiplier critical damage value - } +@@ -1052,7 +_,7 @@ + flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits + if (flag2) { + damageSource = damageSource.critical(); // Paper - critical damage API +- f *= 1.5F; ++ f *= (float) this.level().purpurConfig.playerCriticalDamageMultiplier; // Purpur - Add config change multiplier critical damage value + } - float f2 = f + f1; -@@ -1675,7 +1701,23 @@ public abstract class Player extends Avatar implements ContainerUser { + float f2 = f + f1; +@@ -1764,7 +_,23 @@ @Override protected int getBaseExperienceReward(ServerLevel level) { -- return !level.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator() ? Math.min(this.experienceLevel * 7, 100) : 0; +- return !level.getGameRules().get(GameRules.KEEP_INVENTORY) && !this.isSpectator() ? Math.min(this.experienceLevel * 7, 100) : 0; + // Purpur start - Add player death exp control options -+ if (!level.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator()) { ++ if (!level.getGameRules().get(GameRules.KEEP_INVENTORY) && !this.isSpectator()) { + int toDrop; + try { + toDrop = Math.round(((Number) scriptEngine.eval("let expLevel = " + experienceLevel + "; " + @@ -103,17 +95,17 @@ index 1c165c5d027899b6e9de8a6b731389dad11fb24c..45fe132e78147bb33d986d8098b6b125 } @Override -@@ -1719,6 +1761,13 @@ public abstract class Player extends Avatar implements ContainerUser { +@@ -1807,6 +_,13 @@ + public boolean addItem(ItemStack stack) { return this.inventory.add(stack); } - ++ + // Purpur start - Player ridable in water option + @Override + public boolean dismountsUnderwater() { + return !level().purpurConfig.playerRidableInWater; + } + // Purpur end - Player ridable in water option -+ - @Nullable - public abstract GameType gameMode(); + + public abstract @Nullable GameType gameMode(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/arrow/AbstractArrow.java.patch similarity index 60% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/arrow/AbstractArrow.java.patch index e6b8742db..165e503d9 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/arrow/AbstractArrow.java.patch @@ -1,22 +1,14 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java -index 1be2a7f45866bfe69b8f181fee98d1336b0cfba3..2edd0d3818db2f433ce59f62576aa5c378a11693 100644 ---- a/net/minecraft/world/entity/projectile/AbstractArrow.java -+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -76,6 +76,7 @@ public abstract class AbstractArrow extends Projectile { +--- a/net/minecraft/world/entity/projectile/arrow/AbstractArrow.java ++++ b/net/minecraft/world/entity/projectile/arrow/AbstractArrow.java +@@ -78,6 +_,7 @@ + private @Nullable List piercedAndKilledEntities; public ItemStack pickupItemStack = this.getDefaultPickupItem(); - @Nullable - public ItemStack firedFromWeapon = null; + public @Nullable ItemStack firedFromWeapon = null; + public net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments = net.minecraft.world.item.enchantment.ItemEnchantments.EMPTY; // Purpur - Add an option to fix MC-3304 projectile looting protected AbstractArrow(EntityType type, Level level) { super(type, level); -@@ -344,7 +345,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -359,7 +_,7 @@ this.setInGround(false); Vec3 deltaMovement = this.getDeltaMovement(); this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F)); @@ -25,16 +17,16 @@ index 1be2a7f45866bfe69b8f181fee98d1336b0cfba3..2edd0d3818db2f433ce59f62576aa5c3 } public boolean isInGround() { -@@ -569,6 +570,12 @@ public abstract class AbstractArrow extends Projectile { +@@ -582,6 +_,12 @@ + public @Nullable ItemStack getWeaponItem() { return this.firedFromWeapon; } - ++ + // Purpur start - Add an option to fix MC-3304 projectile looting + public void setActualEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments) { + this.actualEnchantments = actualEnchantments; + } + // Purpur end - Add an option to fix MC-3304 projectile looting -+ + protected SoundEvent getDefaultHitGroundSoundEvent() { return SoundEvents.ARROW_HIT; - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/arrow/ThrownTrident.java.patch similarity index 53% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/arrow/ThrownTrident.java.patch index 7d145f0df..1eef8d9ac 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/arrow/ThrownTrident.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/projectile/ThrownTrident.java b/net/minecraft/world/entity/projectile/ThrownTrident.java -index b12d53af65a5defe11bfffdc08449e4726473de8..ee6f55f5079c803f8cff1dd06efa11f647afd460 100644 ---- a/net/minecraft/world/entity/projectile/ThrownTrident.java -+++ b/net/minecraft/world/entity/projectile/ThrownTrident.java -@@ -69,7 +69,7 @@ public class ThrownTrident extends AbstractArrow { +--- a/net/minecraft/world/entity/projectile/arrow/ThrownTrident.java ++++ b/net/minecraft/world/entity/projectile/arrow/ThrownTrident.java +@@ -72,7 +_,7 @@ Entity owner = this.getOwner(); int i = this.entityData.get(ID_LOYALTY); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/hurtingprojectile/WitherSkull.java.patch similarity index 57% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/hurtingprojectile/WitherSkull.java.patch index 9c6c5cf11..a1ad3be09 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/hurtingprojectile/WitherSkull.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/projectile/WitherSkull.java b/net/minecraft/world/entity/projectile/WitherSkull.java -index 1384e95a9595f9ba9ce59737c635e23b3c1c4326..6787a48f8e06e95caa83e0aa7a6695cedfd6aca4 100644 ---- a/net/minecraft/world/entity/projectile/WitherSkull.java -+++ b/net/minecraft/world/entity/projectile/WitherSkull.java -@@ -94,7 +94,7 @@ public class WitherSkull extends AbstractHurtingProjectile { +--- a/net/minecraft/world/entity/projectile/hurtingprojectile/WitherSkull.java ++++ b/net/minecraft/world/entity/projectile/hurtingprojectile/WitherSkull.java +@@ -94,7 +_,7 @@ super.onHit(result); if (!this.level().isClientSide()) { // CraftBukkit start @@ -17,17 +9,17 @@ index 1384e95a9595f9ba9ce59737c635e23b3c1c4326..6787a48f8e06e95caa83e0aa7a6695ce if (event.callEvent()) { this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); } -@@ -103,6 +103,13 @@ public class WitherSkull extends AbstractHurtingProjectile { +@@ -102,6 +_,13 @@ + this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause } } - ++ + // Purpur start - Add canSaveToDisk to Entity + @Override + public boolean canSaveToDisk() { + return false; + } + // Purpur end - Add canSaveToDisk to Entity -+ + @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { - builder.define(DATA_DANGEROUS, false); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/Snowball.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/throwableitemprojectile/Snowball.java.patch similarity index 82% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/Snowball.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/throwableitemprojectile/Snowball.java.patch index a1c28b52f..10badc693 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/Snowball.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/throwableitemprojectile/Snowball.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/projectile/Snowball.java b/net/minecraft/world/entity/projectile/Snowball.java -index cd36d3a988ae871fe93157c24c26f36308c71fbf..6e6e10140381b63f9833e704f5d35d7e74ac7e66 100644 ---- a/net/minecraft/world/entity/projectile/Snowball.java -+++ b/net/minecraft/world/entity/projectile/Snowball.java -@@ -53,10 +53,40 @@ public class Snowball extends ThrowableItemProjectile { +--- a/net/minecraft/world/entity/projectile/throwableitemprojectile/Snowball.java ++++ b/net/minecraft/world/entity/projectile/throwableitemprojectile/Snowball.java +@@ -53,9 +_,39 @@ protected void onHitEntity(EntityHitResult result) { super.onHitEntity(result); Entity entity = result.getEntity(); @@ -16,7 +8,7 @@ index cd36d3a988ae871fe93157c24c26f36308c71fbf..6e6e10140381b63f9833e704f5d35d7e + int i = entity.level().purpurConfig.snowballDamage >= 0 ? entity.level().purpurConfig.snowballDamage : entity instanceof Blaze ? 3 : 0; // Purpur - Add configurable snowball damage entity.hurt(this.damageSources().thrown(this, this.getOwner()), i); } - ++ + // Purpur start - options to extinguish fire blocks with snowballs - borrowed and modified code from ThrownPotion#onHitBlock and ThrownPotion#dowseFire + @Override + protected void onHitBlock(net.minecraft.world.phys.BlockHitResult blockHitResult) { @@ -46,7 +38,6 @@ index cd36d3a988ae871fe93157c24c26f36308c71fbf..6e6e10140381b63f9833e704f5d35d7e + } + } + // Purpur end - options to extinguish fire blocks with snowballs -+ + @Override protected void onHit(HitResult result) { - super.onHit(result); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java.patch index f5ab14ae5..da76c1d01 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -index 108db190b7ae0798f8d590de11e1e271ec516788..9213d25928066ee6722f1a145ae37e99d6e62582 100644 ---- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -@@ -114,9 +114,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { +--- a/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java ++++ b/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java +@@ -112,9 +_,10 @@ return; } // CraftBukkit end @@ -20,7 +12,7 @@ index 108db190b7ae0798f8d590de11e1e271ec516788..9213d25928066ee6722f1a145ae37e99 endermite.snapTo(preTeleportX, preTeleportY, preTeleportZ, preTeleportYRot, preTeleportXRot); // Paper - spawn endermite at pre teleport position as teleport has been moved up serverLevel.addFreshEntity(endermite, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.ENDER_PEARL); // Paper - add reason } -@@ -136,7 +137,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { +@@ -134,7 +_,7 @@ if (serverPlayer1 != null) { serverPlayer1.resetFallDistance(); serverPlayer1.resetCurrentImpulseContext(); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/raid/Raids.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/raid/Raids.java.patch new file mode 100644 index 000000000..1bf111404 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/raid/Raids.java.patch @@ -0,0 +1,42 @@ +--- a/net/minecraft/world/entity/raid/Raids.java ++++ b/net/minecraft/world/entity/raid/Raids.java +@@ -31,6 +_,7 @@ + + public class Raids extends SavedData { + private static final String RAID_FILE_ID = "raids"; ++ public final java.util.Map playerCooldowns = com.google.common.collect.Maps.newHashMap(); // Purpur - Raid cooldown setting + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + Raids.RaidWithId.CODEC +@@ -82,6 +_,17 @@ + + public void tick(ServerLevel level) { + this.tick++; ++ // Purpur start - Raid cooldown setting ++ if (level.purpurConfig.raidCooldownSeconds != 0 && this.tick % 20 == 0) { ++ com.google.common.collect.ImmutableMap.copyOf(playerCooldowns).forEach((uuid, i) -> { ++ if (i < 1) { ++ playerCooldowns.remove(uuid); ++ } else { ++ playerCooldowns.put(uuid, i - 1); ++ } ++ }); ++ } ++ // Purpur end - Raid cooldown setting + Iterator iterator = this.raidMap.values().iterator(); + + while (iterator.hasNext()) { +@@ -144,11 +_,11 @@ + // } + + 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 (serverLevel.purpurConfig.raidCooldownSeconds != 0 && playerCooldowns.containsKey(player.getUUID())) return null; // Purpur - Raid cooldown setting// CraftBukkit start + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callRaidTriggerEvent(serverLevel, raid, player)) { + player.removeEffect(net.minecraft.world.effect.MobEffects.RAID_OMEN); + return null; +- } ++ }if (serverLevel.purpurConfig.raidCooldownSeconds != 0) playerCooldowns.put(player.getUUID(), serverLevel.purpurConfig.raidCooldownSeconds); // Purpur - Raid cooldown setting + + if (!raid.isStarted() && !this.raidMap.containsValue(raid)) { + this.raidMap.put(this.getUniqueId(), raid); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/boat/AbstractBoat.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/boat/AbstractBoat.java.patch new file mode 100644 index 000000000..b14b6c1de --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/boat/AbstractBoat.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/entity/vehicle/boat/AbstractBoat.java ++++ b/net/minecraft/world/entity/vehicle/boat/AbstractBoat.java +@@ -431,6 +_,7 @@ + float groundFriction = this.getGroundFriction(); + if (groundFriction > 0.0F) { + this.landFriction = groundFriction; ++ if (level().purpurConfig.boatEjectPlayersOnLand) ejectPassengers(); // Purpur - Add option for boats to eject players on land + return AbstractBoat.Status.ON_LAND; + } else { + return AbstractBoat.Status.IN_AIR; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/minecart/NewMinecartBehavior.java.patch similarity index 52% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/minecart/NewMinecartBehavior.java.patch index ead97abc8..a77663c60 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/minecart/NewMinecartBehavior.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java -index 090b19752fbfc856d9fbf118510afc6cda2b9989..325ec57df2885f5e81b8a6b61e3a9fed9484b30f 100644 ---- a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java -+++ b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java -@@ -391,7 +391,7 @@ public class NewMinecartBehavior extends MinecartBehavior { +--- a/net/minecraft/world/entity/vehicle/minecart/NewMinecartBehavior.java ++++ b/net/minecraft/world/entity/vehicle/minecart/NewMinecartBehavior.java +@@ -391,7 +_,7 @@ private Vec3 calculateBoostTrackSpeed(Vec3 speed, BlockPos pos, BlockState state) { if (state.is(Blocks.POWERED_RAIL) && state.getValue(PoweredRailBlock.POWERED)) { if (speed.length() > 0.01) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/minecart/OldMinecartBehavior.java.patch similarity index 56% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/minecart/OldMinecartBehavior.java.patch index 5f6805f5e..5562ff33c 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/minecart/OldMinecartBehavior.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java -index 0c68ac49780724e32f982fb259f5e3cbf6d50bdd..3cd5c5c753483390ae00e5d55f1fdaca82490e56 100644 ---- a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java -+++ b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java -@@ -243,8 +243,8 @@ public class OldMinecartBehavior extends MinecartBehavior { +--- a/net/minecraft/world/entity/vehicle/minecart/OldMinecartBehavior.java ++++ b/net/minecraft/world/entity/vehicle/minecart/OldMinecartBehavior.java +@@ -243,8 +_,8 @@ Vec3 deltaMovement1 = this.getDeltaMovement(); double d13 = deltaMovement1.horizontalDistance(); if (d13 > 0.01) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/food/FoodData.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodData.java.patch similarity index 75% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/food/FoodData.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodData.java.patch index 2f12c2dc4..a44cdd312 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/food/FoodData.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodData.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/food/FoodData.java b/net/minecraft/world/food/FoodData.java -index 41d1a0d5e8d6564b179757d7e5e132dc39174a47..8f9386dc0e71dca72c7a613dd24892b37f66e38e 100644 --- a/net/minecraft/world/food/FoodData.java +++ b/net/minecraft/world/food/FoodData.java -@@ -39,6 +39,7 @@ public class FoodData { +@@ -39,6 +_,7 @@ int oldFoodLevel = this.foodLevel; org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(serverPlayer, foodProperties.nutrition() + oldFoodLevel, stack); if (!event.isCancelled()) { @@ -16,7 +8,7 @@ index 41d1a0d5e8d6564b179757d7e5e132dc39174a47..8f9386dc0e71dca72c7a613dd24892b3 this.add(event.getFoodLevel() - oldFoodLevel, foodProperties.saturation()); } serverPlayer.getBukkitEntity().sendHealthUpdate(); -@@ -87,7 +88,7 @@ public class FoodData { +@@ -87,7 +_,7 @@ this.tickTimer++; if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation if (player.getHealth() > 10.0F || difficulty == Difficulty.HARD || player.getHealth() > 1.0F && difficulty == Difficulty.NORMAL) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/food/FoodProperties.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch similarity index 66% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/food/FoodProperties.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch index b0e0b6e1d..87515c815 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/food/FoodProperties.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/food/FoodProperties.java b/net/minecraft/world/food/FoodProperties.java -index 793e4528755fa5688efbad75418188e693ad0157..20f702c8266eb54a8835861188eb937f4732e078 100644 --- a/net/minecraft/world/food/FoodProperties.java +++ b/net/minecraft/world/food/FoodProperties.java -@@ -42,9 +42,11 @@ public record FoodProperties(int nutrition, float saturation, boolean canAlwaysE +@@ -42,9 +_,11 @@ level.playSound(null, entity.getX(), entity.getY(), entity.getZ(), consumable.sound().value(), SoundSource.NEUTRAL, 1.0F, random.triangle(1.0F, 0.4F)); if (entity instanceof Player player) { player.getFoodData().eat(this, stack, (net.minecraft.server.level.ServerPlayer) player); // CraftBukkit diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch new file mode 100644 index 000000000..ef13da00d --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/inventory/AbstractContainerMenu.java ++++ b/net/minecraft/world/inventory/AbstractContainerMenu.java +@@ -63,6 +_,7 @@ + private final List containerListeners = Lists.newArrayList(); + private @Nullable ContainerSynchronizer synchronizer; + private boolean suppressRemoteUpdates; ++ @Nullable protected ItemStack activeQuickItem = null; // Purpur - Anvil API + // CraftBukkit start + public boolean checkReachable = true; + public abstract org.bukkit.inventory.InventoryView getBukkitView(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch similarity index 64% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch index a3b078a6a..41fe20831 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/inventory/AbstractFurnaceMenu.java b/net/minecraft/world/inventory/AbstractFurnaceMenu.java -index 6e13b05ebd924d98066624d9ff6ee7f61e248617..9304bc239ffafbef3b34c5a5a42039c86acd5e80 100644 --- a/net/minecraft/world/inventory/AbstractFurnaceMenu.java +++ b/net/minecraft/world/inventory/AbstractFurnaceMenu.java -@@ -121,7 +121,13 @@ public abstract class AbstractFurnaceMenu extends RecipeBookMenu { +@@ -121,7 +_,13 @@ } else if (slotIndex != 1 && slotIndex != 0) { if (this.canSmelt(item)) { if (!this.moveItemStackTo(item, 0, 1, false)) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AnvilMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch similarity index 91% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AnvilMenu.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch index 0f0d97439..34fcab570 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AnvilMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch @@ -1,15 +1,7 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/inventory/AnvilMenu.java b/net/minecraft/world/inventory/AnvilMenu.java -index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8f26c1a88 100644 --- a/net/minecraft/world/inventory/AnvilMenu.java +++ b/net/minecraft/world/inventory/AnvilMenu.java -@@ -23,6 +23,12 @@ import net.minecraft.world.level.block.LevelEvent; - import net.minecraft.world.level.block.state.BlockState; +@@ -23,6 +_,12 @@ + import org.jspecify.annotations.Nullable; import org.slf4j.Logger; +// Purpur start - Anvil API @@ -21,7 +13,7 @@ index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8 public class AnvilMenu extends ItemCombinerMenu { public static final int INPUT_SLOT = 0; public static final int ADDITIONAL_SLOT = 1; -@@ -52,6 +58,10 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -51,6 +_,10 @@ private org.bukkit.craftbukkit.inventory.view.CraftAnvilView bukkitEntity; // CraftBukkit end public boolean bypassEnchantmentLevelRestriction = false; // Paper - bypass anvil level restrictions @@ -32,7 +24,7 @@ index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8 public AnvilMenu(int containerId, Inventory playerInventory) { this(containerId, playerInventory, ContainerLevelAccess.NULL); -@@ -77,12 +87,17 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -76,12 +_,17 @@ @Override protected boolean mayPickup(Player player, boolean hasStack) { @@ -51,7 +43,7 @@ index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8 player.giveExperienceLevels(-this.cost.get()); } -@@ -135,13 +150,19 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -134,13 +_,19 @@ @Override public void createResult() { @@ -72,7 +64,7 @@ index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8 ItemStack itemStack = item.copy(); ItemStack item1 = this.inputSlots.getItem(1); ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(EnchantmentHelper.getEnchantmentsForCrafting(itemStack)); -@@ -199,23 +220,34 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -198,23 +_,34 @@ int intValue = entry.getIntValue(); intValue = level == intValue ? intValue + 1 : Math.max(intValue, level); Enchantment enchantment = holder.value(); @@ -111,7 +103,7 @@ index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8 intValue = enchantment.getMaxLevel(); } -@@ -244,6 +276,54 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -243,6 +_,54 @@ if (!this.itemName.equals(item.getHoverName().getString())) { i1 = 1; i += i1; @@ -166,7 +158,7 @@ index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8 itemStack.set(DataComponents.CUSTOM_NAME, Component.literal(this.itemName)); } } else if (item.has(DataComponents.CUSTOM_NAME)) { -@@ -268,6 +348,12 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -267,6 +_,12 @@ this.onlyRenaming = true; } @@ -179,7 +171,7 @@ index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8 if (this.cost.get() >= this.maximumRepairCost && !this.player.hasInfiniteMaterials()) { // CraftBukkit itemStack = ItemStack.EMPTY; } -@@ -288,6 +374,13 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -287,6 +_,13 @@ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), itemStack); // CraftBukkit this.broadcastChanges(); @@ -193,7 +185,7 @@ index 9a3887752aa4b39224c9bf6e6145e20fa6962439..2f79a98ebc6a058e139c6b1e7aa38cd8 } else { 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 -@@ -296,7 +389,7 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -295,7 +_,7 @@ } public static int calculateIncreasedRepairCost(int oldRepairCost) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/ArmorSlot.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ArmorSlot.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/ArmorSlot.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ArmorSlot.java.patch index 545fb96bc..d2b8cef83 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/ArmorSlot.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ArmorSlot.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/inventory/ArmorSlot.java b/net/minecraft/world/inventory/ArmorSlot.java -index 0a440ea37d14cd840cf87a99264ace5ccde7c073..dec920727401de7f5bcc6c7e50f9dd325367ee90 100644 --- a/net/minecraft/world/inventory/ArmorSlot.java +++ b/net/minecraft/world/inventory/ArmorSlot.java -@@ -47,7 +47,7 @@ class ArmorSlot extends Slot { +@@ -46,7 +_,7 @@ @Override public boolean mayPickup(Player player) { ItemStack item = this.getItem(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch similarity index 79% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch index d05a4b93f..4996e388d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/inventory/EnchantmentMenu.java b/net/minecraft/world/inventory/EnchantmentMenu.java -index ca02ff1180273e9018f042a1621b15af25f2b84e..e78e200f7b6f42399d0001d6a4e9a1d7e3743a24 100644 --- a/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/net/minecraft/world/inventory/EnchantmentMenu.java -@@ -63,6 +63,22 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -63,6 +_,22 @@ return access.getLocation(); } // CraftBukkit end @@ -31,7 +23,7 @@ index ca02ff1180273e9018f042a1621b15af25f2b84e..e78e200f7b6f42399d0001d6a4e9a1d7 }; // Paper end - Add missing InventoryHolders this.access = access; -@@ -83,6 +99,16 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -83,6 +_,16 @@ return EnchantmentMenu.EMPTY_SLOT_LAPIS_LAZULI; } }); @@ -48,7 +40,7 @@ index ca02ff1180273e9018f042a1621b15af25f2b84e..e78e200f7b6f42399d0001d6a4e9a1d7 this.addStandardInventorySlots(playerInventory, 8, 84); this.addDataSlot(DataSlot.shared(this.costs, 0)); this.addDataSlot(DataSlot.shared(this.costs, 1)); -@@ -299,7 +325,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -299,7 +_,7 @@ @Override public void removed(Player player) { super.removed(player); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch similarity index 89% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch index d4d550876..f1ba2081a 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/inventory/GrindstoneMenu.java b/net/minecraft/world/inventory/GrindstoneMenu.java -index ad70a0f7debee27d9f3b2ff39cb0429b39485190..e991ca16d069fddc3e4eb6d8c78c0dbffeb75a54 100644 --- a/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/net/minecraft/world/inventory/GrindstoneMenu.java -@@ -92,11 +92,13 @@ public class GrindstoneMenu extends AbstractContainerMenu { +@@ -92,11 +_,13 @@ @Override public void onTake(Player player, ItemStack stack) { access.execute((level, blockPos) -> { @@ -23,7 +15,7 @@ index ad70a0f7debee27d9f3b2ff39cb0429b39485190..e991ca16d069fddc3e4eb6d8c78c0dbf // Paper end - Fire BlockExpEvent on grindstone use } -@@ -125,7 +127,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { +@@ -125,7 +_,7 @@ for (Entry> entry : enchantmentsForCrafting.entrySet()) { Holder holder = entry.getKey(); int intValue = entry.getIntValue(); @@ -32,7 +24,7 @@ index ad70a0f7debee27d9f3b2ff39cb0429b39485190..e991ca16d069fddc3e4eb6d8c78c0dbf i += holder.value().getMinCost(intValue); } } -@@ -203,15 +205,75 @@ public class GrindstoneMenu extends AbstractContainerMenu { +@@ -203,15 +_,75 @@ for (Entry> entry : enchantmentsForCrafting.entrySet()) { Holder holder = entry.getKey(); @@ -110,7 +102,7 @@ index ad70a0f7debee27d9f3b2ff39cb0429b39485190..e991ca16d069fddc3e4eb6d8c78c0dbf if (item.is(Items.ENCHANTED_BOOK) && itemEnchantments.isEmpty()) { item = item.transmuteCopy(Items.BOOK); } -@@ -223,6 +285,23 @@ public class GrindstoneMenu extends AbstractContainerMenu { +@@ -223,6 +_,23 @@ } item.set(DataComponents.REPAIR_COST, i); @@ -134,7 +126,7 @@ index ad70a0f7debee27d9f3b2ff39cb0429b39485190..e991ca16d069fddc3e4eb6d8c78c0dbf return item; } -@@ -279,7 +358,9 @@ public class GrindstoneMenu extends AbstractContainerMenu { +@@ -279,7 +_,9 @@ return ItemStack.EMPTY; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch new file mode 100644 index 000000000..9899e30a5 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch @@ -0,0 +1,12 @@ +--- a/net/minecraft/world/inventory/ItemCombinerMenu.java ++++ b/net/minecraft/world/inventory/ItemCombinerMenu.java +@@ -156,7 +_,9 @@ + return ItemStack.EMPTY; + } + ++ this.activeQuickItem = itemStack; // Purpur - Anvil API + slot.onTake(player, item); ++ this.activeQuickItem = null; // Purpur - Anvil API + } + + return itemStack; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/AxeItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/AxeItem.java.patch similarity index 90% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/AxeItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/AxeItem.java.patch index e609cad2f..91c2180ca 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/AxeItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/AxeItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/AxeItem.java b/net/minecraft/world/item/AxeItem.java -index 0549d808abaa626dc33df243b9493a6be90500e2..57ad7c438353aa4d0589894a7cab0554d9758c56 100644 --- a/net/minecraft/world/item/AxeItem.java +++ b/net/minecraft/world/item/AxeItem.java -@@ -65,13 +65,15 @@ public class AxeItem extends Item { +@@ -65,13 +_,15 @@ if (playerHasBlockingItemUseIntent(context)) { return InteractionResult.PASS; } else { @@ -26,7 +18,7 @@ index 0549d808abaa626dc33df243b9493a6be90500e2..57ad7c438353aa4d0589894a7cab0554 return InteractionResult.PASS; } // Paper end -@@ -79,8 +81,15 @@ public class AxeItem extends Item { +@@ -79,8 +_,15 @@ CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, clickedPos, itemInHand); } @@ -44,7 +36,7 @@ index 0549d808abaa626dc33df243b9493a6be90500e2..57ad7c438353aa4d0589894a7cab0554 if (player != null) { itemInHand.hurtAndBreak(1, player, context.getHand().asEquipmentSlot()); } -@@ -97,21 +106,23 @@ public class AxeItem extends Item { +@@ -97,21 +_,23 @@ && !player.isSecondaryUseActive(); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BlockItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BlockItem.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BlockItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/BlockItem.java.patch index 1051e8c8a..d8bd11e1f 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BlockItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BlockItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java -index 10530a630e4dbb100eef195944dd3bee7a4e70e1..47a73c71396c7302175257670d4a7a5c5d8d20af 100644 --- a/net/minecraft/world/item/BlockItem.java +++ b/net/minecraft/world/item/BlockItem.java -@@ -143,7 +143,16 @@ public class BlockItem extends Item { +@@ -143,7 +_,16 @@ } protected boolean updateCustomBlockEntityTag(BlockPos pos, Level level, @Nullable Player player, ItemStack stack, BlockState state) { @@ -25,8 +17,8 @@ index 10530a630e4dbb100eef195944dd3bee7a4e70e1..47a73c71396c7302175257670d4a7a5c + // Purpur end - Persistent BlockEntity Lore and DisplayName } - @Nullable -@@ -205,6 +214,7 @@ public class BlockItem extends Item { + protected @Nullable BlockState getPlacementState(BlockPlaceContext context) { +@@ -204,6 +_,7 @@ } if (!type.onlyOpCanSetNbt() || player != null && (player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place")))) { // Spigot - add permission @@ -34,7 +26,7 @@ index 10530a630e4dbb100eef195944dd3bee7a4e70e1..47a73c71396c7302175257670d4a7a5c return typedEntityData.loadInto(blockEntity, level.registryAccess()); } -@@ -245,6 +255,7 @@ public class BlockItem extends Item { +@@ -244,6 +_,7 @@ public void onDestroyed(ItemEntity itemEntity) { ItemContainerContents itemContainerContents = itemEntity.getItem().set(DataComponents.CONTAINER, ItemContainerContents.EMPTY); if (itemContainerContents != null) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BowItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BowItem.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BowItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/BowItem.java.patch index 2b3dd622e..bb43e3ee4 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BowItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BowItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/BowItem.java b/net/minecraft/world/item/BowItem.java -index c4c8775de328d40bb8218d993872be5249e8174d..ce1ce18410fc1d47d999c918a8f880b43bf9797c 100644 --- a/net/minecraft/world/item/BowItem.java +++ b/net/minecraft/world/item/BowItem.java -@@ -28,6 +28,11 @@ public class BowItem extends ProjectileWeaponItem { +@@ -28,6 +_,11 @@ return false; } else { ItemStack projectile = player.getProjectile(stack); @@ -20,7 +12,7 @@ index c4c8775de328d40bb8218d993872be5249e8174d..ce1ce18410fc1d47d999c918a8f880b4 if (projectile.isEmpty()) { return false; } else { -@@ -38,7 +43,7 @@ public class BowItem extends ProjectileWeaponItem { +@@ -38,7 +_,7 @@ } else { List list = draw(stack, projectile, player); if (level instanceof ServerLevel serverLevel && !list.isEmpty()) { @@ -29,7 +21,7 @@ index c4c8775de328d40bb8218d993872be5249e8174d..ce1ce18410fc1d47d999c918a8f880b4 } level.playSound( -@@ -89,7 +94,7 @@ public class BowItem extends ProjectileWeaponItem { +@@ -89,7 +_,7 @@ public InteractionResult use(Level level, Player player, InteractionHand hand) { ItemStack itemInHand = player.getItemInHand(hand); boolean flag = !player.getProjectile(itemInHand).isEmpty(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/CrossbowItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/CrossbowItem.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/CrossbowItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/CrossbowItem.java.patch index 325aa13a7..c2e3f0e41 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/CrossbowItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/CrossbowItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/CrossbowItem.java b/net/minecraft/world/item/CrossbowItem.java -index 576b87ed90e620a19ccb5931c9a23a72243a8bbd..c4279f25223eacbb708134b4562c0cd042161a30 100644 --- a/net/minecraft/world/item/CrossbowItem.java +++ b/net/minecraft/world/item/CrossbowItem.java -@@ -66,7 +66,7 @@ public class CrossbowItem extends ProjectileWeaponItem { +@@ -66,7 +_,7 @@ ItemStack itemInHand = player.getItemInHand(hand); ChargedProjectiles chargedProjectiles = itemInHand.get(DataComponents.CHARGED_PROJECTILES); if (chargedProjectiles != null && !chargedProjectiles.isEmpty()) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/DyeColor.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/DyeColor.java.patch similarity index 55% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/DyeColor.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/DyeColor.java.patch index ccc19bfc0..2bafea6dd 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/DyeColor.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/DyeColor.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/DyeColor.java b/net/minecraft/world/item/DyeColor.java -index cc828a7f7eeb22ce37fc4ca2fe8b68e70a206b61..fe71f28c0273a23ba6f798eacd6f9a6a8e36ec9b 100644 --- a/net/minecraft/world/item/DyeColor.java +++ b/net/minecraft/world/item/DyeColor.java -@@ -126,4 +126,10 @@ public enum DyeColor implements StringRepresentable { +@@ -124,4 +_,10 @@ private static CraftingInput makeCraftColorInput(DyeColor first, DyeColor second) { return CraftingInput.of(2, 1, List.of(new ItemStack(DyeItem.byColor(first)), new ItemStack(DyeItem.byColor(second)))); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EggItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EggItem.java.patch similarity index 72% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EggItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/EggItem.java.patch index 6fb803fbe..7bd1d11bf 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EggItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EggItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/EggItem.java b/net/minecraft/world/item/EggItem.java -index 2dc15a06572401c22fa4b8009fa1cdc3ceef0473..75ce17c1fa8c74981c44f3dab7e82351eef3b2f3 100644 --- a/net/minecraft/world/item/EggItem.java +++ b/net/minecraft/world/item/EggItem.java -@@ -24,7 +24,7 @@ public class EggItem extends Item implements ProjectileItem { +@@ -24,7 +_,7 @@ public InteractionResult use(Level level, Player player, InteractionHand hand) { ItemStack itemInHand = player.getItemInHand(hand); // Paper start diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EndCrystalItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch similarity index 60% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EndCrystalItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch index ead64194e..baee5e0ab 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EndCrystalItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/EndCrystalItem.java b/net/minecraft/world/item/EndCrystalItem.java -index 05ec512839898f96d9769bb0d00f6ba11dda0c4b..6e4a3c9c090a68bf5785a01d815c275411859c7b 100644 --- a/net/minecraft/world/item/EndCrystalItem.java +++ b/net/minecraft/world/item/EndCrystalItem.java -@@ -24,7 +24,7 @@ public class EndCrystalItem extends Item { +@@ -24,7 +_,7 @@ Level level = context.getLevel(); BlockPos clickedPos = context.getClickedPos(); BlockState blockState = level.getBlockState(clickedPos); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EnderpearlItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EnderpearlItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch index ea6d1df10..de340dafe 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/EnderpearlItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/EnderpearlItem.java b/net/minecraft/world/item/EnderpearlItem.java -index 0b4464b23a85c237026b31ab224f599fea42d2ee..411ddda1003ac1b9bb75735154ffe8996ab8b6f3 100644 --- a/net/minecraft/world/item/EnderpearlItem.java +++ b/net/minecraft/world/item/EnderpearlItem.java -@@ -24,7 +24,7 @@ public class EnderpearlItem extends Item { +@@ -24,7 +_,7 @@ if (level instanceof ServerLevel serverLevel) { // CraftBukkit start // Paper start - PlayerLaunchProjectileEvent @@ -17,7 +9,7 @@ index 0b4464b23a85c237026b31ab224f599fea42d2ee..411ddda1003ac1b9bb75735154ffe899 com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) player.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemInHand), (org.bukkit.entity.Projectile) thrownEnderpearl.projectile().getBukkitEntity()); if (event.callEvent() && thrownEnderpearl.attemptSpawn()) { if (event.shouldConsume()) { -@@ -44,6 +44,7 @@ public class EnderpearlItem extends Item { +@@ -44,6 +_,7 @@ 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F) ); player.awardStat(Stats.ITEM_USED.get(this)); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/HoeItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/HoeItem.java.patch similarity index 82% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/HoeItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/HoeItem.java.patch index 75ba78db6..cfe01d6ad 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/HoeItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/HoeItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/HoeItem.java b/net/minecraft/world/item/HoeItem.java -index d9d03bfcb1cb10aa03b35255c4237760bc836752..bf14cbcc6ed4c89ef6f15b3cb248a599cbc26e29 100644 --- a/net/minecraft/world/item/HoeItem.java +++ b/net/minecraft/world/item/HoeItem.java -@@ -44,15 +44,25 @@ public class HoeItem extends Item { +@@ -44,15 +_,25 @@ public InteractionResult useOn(UseOnContext context) { Level level = context.getLevel(); BlockPos clickedPos = context.getClickedPos(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ItemStack.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ItemStack.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch index 71ed4eda9..c68595320 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ItemStack.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java -index 47862c00e9e01c7cdd5fcd808cc1b76740b85a57..b367b94ba6977b94c7f46c9f02ed6c3fc5284185 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -451,6 +451,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -456,6 +_,7 @@ // revert back all captured blocks for (org.bukkit.block.BlockState blockstate : blocks) { ((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace(); @@ -16,7 +8,7 @@ index 47862c00e9e01c7cdd5fcd808cc1b76740b85a57..b367b94ba6977b94c7f46c9f02ed6c3f } SignItem.openSign = null; // SPIGOT-6758 - Reset on early return -@@ -474,6 +475,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -479,6 +_,7 @@ if (!(block.getBlock() instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Containers get placed automatically block.onPlace(serverLevel, newPos, oldBlock, true, context); } @@ -24,7 +16,7 @@ index 47862c00e9e01c7cdd5fcd808cc1b76740b85a57..b367b94ba6977b94c7f46c9f02ed6c3f serverLevel.notifyAndUpdatePhysics(newPos, null, oldBlock, block, serverLevel.getBlockState(newPos), updateFlags, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point } -@@ -594,6 +596,26 @@ public final class ItemStack implements DataComponentHolder { +@@ -599,6 +_,26 @@ return this.isDamageableItem() && this.getDamageValue() > 0; } @@ -51,16 +43,16 @@ index 47862c00e9e01c7cdd5fcd808cc1b76740b85a57..b367b94ba6977b94c7f46c9f02ed6c3f public int getDamageValue() { return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage()); } -@@ -1210,6 +1232,12 @@ public final class ItemStack implements DataComponentHolder { +@@ -1241,6 +_,12 @@ + public boolean isEnchanted() { return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty(); } - ++ + // Purpur start - Config to allow unsafe enchants + public boolean hasEnchantment(Holder enchantment) { + return this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).getLevel(enchantment) > 0; + } + // Purpur end - Config to allow unsafe enchants -+ + public ItemEnchantments getEnchantments() { return this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY); - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/Items.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/Items.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/Items.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/Items.java.patch index 912e77821..bebe1da21 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/Items.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/Items.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/Items.java b/net/minecraft/world/item/Items.java -index b37550fff62d07aab1a9bc955dcba6418f9f440c..9fdf823c0bb04965897b9775668d7ad73a3adfc0 100644 --- a/net/minecraft/world/item/Items.java +++ b/net/minecraft/world/item/Items.java -@@ -420,7 +420,7 @@ public class Items { +@@ -420,7 +_,7 @@ public static final Item PURPUR_BLOCK = registerBlock(Blocks.PURPUR_BLOCK); public static final Item PURPUR_PILLAR = registerBlock(Blocks.PURPUR_PILLAR); public static final Item PURPUR_STAIRS = registerBlock(Blocks.PURPUR_STAIRS); @@ -17,7 +9,7 @@ index b37550fff62d07aab1a9bc955dcba6418f9f440c..9fdf823c0bb04965897b9775668d7ad7 public static final Item CREAKING_HEART = registerBlock(Blocks.CREAKING_HEART); public static final Item CHEST = registerBlock(Blocks.CHEST, properties -> properties.component(DataComponents.CONTAINER, ItemContainerContents.EMPTY)); public static final Item CRAFTING_TABLE = registerBlock(Blocks.CRAFTING_TABLE); -@@ -2178,7 +2178,7 @@ public class Items { +@@ -2169,7 +_,7 @@ "sweet_berries", createBlockItemWithCustomItemName(Blocks.SWEET_BERRY_BUSH), new Item.Properties().food(Foods.SWEET_BERRIES) ); public static final Item GLOW_BERRIES = registerItem( diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/MapItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/MapItem.java.patch similarity index 53% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/MapItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/MapItem.java.patch index 381cc2e9d..c609ab3c7 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/MapItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/MapItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/MapItem.java b/net/minecraft/world/item/MapItem.java -index c64e2abefb8319c16d142ee44479c4965a47d98f..27efca58d7ebe5df8f117160c0e809ec50dd78d3 100644 --- a/net/minecraft/world/item/MapItem.java +++ b/net/minecraft/world/item/MapItem.java -@@ -194,6 +194,7 @@ public class MapItem extends Item { +@@ -192,6 +_,7 @@ public static void renderBiomePreviewMap(ServerLevel level, ItemStack stack) { MapItemSavedData savedData = getSavedData(stack, level); if (savedData != null) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/NameTagItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/NameTagItem.java.patch similarity index 64% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/NameTagItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/NameTagItem.java.patch index a00564785..2a8639361 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/NameTagItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/NameTagItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/NameTagItem.java b/net/minecraft/world/item/NameTagItem.java -index 24bf4cd320c67b852d3905c50740c8006592bd68..7ee4bd968a43123e21e65f77f30495e65146aca5 100644 --- a/net/minecraft/world/item/NameTagItem.java +++ b/net/minecraft/world/item/NameTagItem.java -@@ -24,6 +24,7 @@ public class NameTagItem extends Item { +@@ -24,6 +_,7 @@ LivingEntity newEntity = ((org.bukkit.craftbukkit.entity.CraftLivingEntity) event.getEntity()).getHandle(); newEntity.setCustomName(event.getName() != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(event.getName()) : null); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch new file mode 100644 index 000000000..3fa0c2dfa --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/ProjectileWeaponItem.java ++++ b/net/minecraft/world/item/ProjectileWeaponItem.java +@@ -106,6 +_,8 @@ + abstractArrow.setCritArrow(true); + } + ++ abstractArrow.setActualEnchantments(weapon.getEnchantments()); // Purpur - Add an option to fix MC-3304 projectile looting ++ + return abstractArrow; + } + diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ShovelItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch similarity index 74% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ShovelItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch index dce59c4b8..c583f3853 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ShovelItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/ShovelItem.java b/net/minecraft/world/item/ShovelItem.java -index ba0609f4d9166e66599f9d4430885ab03d53ef41..7910c96cc47985acc8b64ba376933c84c51022d4 100644 --- a/net/minecraft/world/item/ShovelItem.java +++ b/net/minecraft/world/item/ShovelItem.java -@@ -46,9 +46,12 @@ public class ShovelItem extends Item { +@@ -46,9 +_,12 @@ BlockState blockState1 = FLATTENABLES.get(blockState.getBlock()); BlockState blockState2 = null; Runnable afterAction = null; // Paper diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/SnowballItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SnowballItem.java.patch similarity index 72% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/SnowballItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/SnowballItem.java.patch index 78a3bb34c..9c09ecb72 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/SnowballItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SnowballItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/SnowballItem.java b/net/minecraft/world/item/SnowballItem.java -index bef1a8faa8e9567c9707ffb2b34c278c75581e35..fa3a9501134226f269882a14900b924df7d25046 100644 --- a/net/minecraft/world/item/SnowballItem.java +++ b/net/minecraft/world/item/SnowballItem.java -@@ -26,7 +26,7 @@ public class SnowballItem extends Item implements ProjectileItem { +@@ -26,7 +_,7 @@ // CraftBukkit start - moved down if (level instanceof ServerLevel serverLevel) { // Paper start - PlayerLaunchProjectileEvent diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/SpawnEggItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch similarity index 84% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/SpawnEggItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch index 113a0ab0c..453518159 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/SpawnEggItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/SpawnEggItem.java b/net/minecraft/world/item/SpawnEggItem.java -index ea79f2d579763ed8a5116c40e1d3f70fce5f043f..646fb8131e33a1368ef1b2a6ae72d89b6fdba937 100644 --- a/net/minecraft/world/item/SpawnEggItem.java +++ b/net/minecraft/world/item/SpawnEggItem.java -@@ -69,6 +69,23 @@ public class SpawnEggItem extends Item { +@@ -70,6 +_,23 @@ return InteractionResult.FAIL; } else { if (level.paperConfig().entities.spawning.disableMobSpawnerSpawnEggTransformation) return InteractionResult.FAIL; // Paper - Allow disabling mob spawner spawn egg transformation diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ThrowablePotionItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ThrowablePotionItem.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ThrowablePotionItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/ThrowablePotionItem.java.patch index 856ec0897..5cf5ead6e 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ThrowablePotionItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ThrowablePotionItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/ThrowablePotionItem.java b/net/minecraft/world/item/ThrowablePotionItem.java -index 92a2a9c84d8f0a44dffee22834f5ae6c6b4fec43..e2cdb3d43eca6e0e52fb00fbf3801f4b0983c19b 100644 --- a/net/minecraft/world/item/ThrowablePotionItem.java +++ b/net/minecraft/world/item/ThrowablePotionItem.java -@@ -24,7 +24,7 @@ public abstract class ThrowablePotionItem extends PotionItem implements Projecti +@@ -24,7 +_,7 @@ ItemStack itemInHand = player.getItemInHand(hand); if (level instanceof ServerLevel serverLevel) { // Paper start - PlayerLaunchProjectileEvent diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/TridentItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/TridentItem.java.patch similarity index 75% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/TridentItem.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/TridentItem.java.patch index f885c7d3f..16aa72e60 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/TridentItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/TridentItem.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/TridentItem.java b/net/minecraft/world/item/TridentItem.java -index 2c38f40e87e711942c41c0740fbb2b4080ab9bcf..44b616ad2740d6ba9c8b2579ecd14edde64fffbb 100644 --- a/net/minecraft/world/item/TridentItem.java +++ b/net/minecraft/world/item/TridentItem.java -@@ -83,7 +83,7 @@ public class TridentItem extends Item implements ProjectileItem { +@@ -83,7 +_,7 @@ if (tridentSpinAttackStrength == 0.0F) { ItemStack itemStack = stack.copyWithCount(1); // Paper Projectile.Delayed tridentDelayed = Projectile.spawnProjectileFromRotationDelayed( // Paper - PlayerLaunchProjectileEvent( @@ -17,7 +9,7 @@ index 2c38f40e87e711942c41c0740fbb2b4080ab9bcf..44b616ad2740d6ba9c8b2579ecd14edd ); // Paper start - PlayerLaunchProjectileEvent com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) player.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(stack), (org.bukkit.entity.Projectile) tridentDelayed.projectile().getBukkitEntity()); -@@ -93,6 +93,7 @@ public class TridentItem extends Item implements ProjectileItem { +@@ -93,6 +_,7 @@ return false; } ThrownTrident thrownTrident = tridentDelayed.projectile(); // Paper - PlayerLaunchProjectileEvent diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch index f4c8be854..65243f097 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java -index 41e1e076a4567d3d3202cf8e426a1ebb391d85e8..2d710dd3f20cbea06c16f14a558b575b369c6ca2 100644 --- a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java +++ b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java -@@ -20,6 +20,12 @@ public record ClearAllStatusEffectsConsumeEffect() implements ConsumeEffect { +@@ -20,6 +_,12 @@ @Override // CraftBukkit start public boolean apply(Level level, ItemStack stack, LivingEntity entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause cause) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/crafting/Ingredient.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/crafting/Ingredient.java.patch new file mode 100644 index 000000000..5c451611e --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/crafting/Ingredient.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/world/item/crafting/Ingredient.java ++++ b/net/minecraft/world/item/crafting/Ingredient.java +@@ -36,6 +_,7 @@ + // CraftBukkit start + @javax.annotation.Nullable + private java.util.List itemStacks; ++ public Predicate predicate; // Purpur - Add predicate to recipe's ExactChoice ingredient + + public boolean isExact() { + return this.itemStacks != null; +@@ -90,6 +_,11 @@ + return false; + } + // CraftBukkit end ++ // Purpur start - Add predicate to recipe's ExactChoice ingredient ++ if (predicate != null) { ++ return predicate.test(stack.asBukkitCopy()); ++ } ++ // Purpur end - Add predicate to recipe's ExactChoice ingredient + return stack.is(this.values); + } + diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/enchantment/EnchantmentHelper.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/EnchantmentHelper.java.patch similarity index 84% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/enchantment/EnchantmentHelper.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/EnchantmentHelper.java.patch index 0b62c6e26..ff04dde7b 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/enchantment/EnchantmentHelper.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/EnchantmentHelper.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/net/minecraft/world/item/enchantment/EnchantmentHelper.java -index 699cd012894cf9c09751c118d26994360f07193b..6adb770c867af41aabf7e3810ec147ac1e14d771 100644 --- a/net/minecraft/world/item/enchantment/EnchantmentHelper.java +++ b/net/minecraft/world/item/enchantment/EnchantmentHelper.java -@@ -606,4 +606,58 @@ public class EnchantmentHelper { +@@ -616,4 +_,58 @@ interface EnchantmentVisitor { void accept(Holder enchantment, int level); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch index 6b73cf8aa..8a8607dab 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/enchantment/ItemEnchantments.java b/net/minecraft/world/item/enchantment/ItemEnchantments.java -index 6040b73a5351c3eb166250566b5c2385cee39ee0..29619b87fe19c66934fe5aaee8a9641960091bf5 100644 --- a/net/minecraft/world/item/enchantment/ItemEnchantments.java +++ b/net/minecraft/world/item/enchantment/ItemEnchantments.java -@@ -32,7 +32,7 @@ public class ItemEnchantments implements TooltipProvider { +@@ -32,7 +_,7 @@ private static final java.util.Comparator> ENCHANTMENT_ORDER = java.util.Comparator.comparing(Holder::getRegisteredName); public static final ItemEnchantments EMPTY = new ItemEnchantments(new it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER)); // Paper end - sort enchantments @@ -16,8 +8,8 @@ index 6040b73a5351c3eb166250566b5c2385cee39ee0..29619b87fe19c66934fe5aaee8a96419 + private static final Codec LEVEL_CODEC = Codec.intRange(1, (org.purpurmc.purpur.PurpurConfig.clampEnchantLevels ? 255 : 32767)); // Purpur - Add toggle for enchant level clamping public static final Codec CODEC = Codec.unboundedMap(Enchantment.CODEC, LEVEL_CODEC) .xmap( - map -> new net.minecraft.world.item.enchantment.ItemEnchantments(net.minecraft.Util.make(new it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), m -> m.putAll(map))), // Paper - sort enchantments -@@ -50,7 +50,7 @@ public class ItemEnchantments implements TooltipProvider { + map -> new net.minecraft.world.item.enchantment.ItemEnchantments(net.minecraft.util.Util.make(new it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), m -> m.putAll(map))), // Paper - sort enchantments +@@ -50,7 +_,7 @@ for (Entry> entry : enchantments.object2IntEntrySet()) { int intValue = entry.getIntValue(); @@ -26,7 +18,7 @@ index 6040b73a5351c3eb166250566b5c2385cee39ee0..29619b87fe19c66934fe5aaee8a96419 throw new IllegalArgumentException("Enchantment " + entry.getKey() + " has invalid level " + intValue); } } -@@ -133,13 +133,13 @@ public class ItemEnchantments implements TooltipProvider { +@@ -133,13 +_,13 @@ if (level <= 0) { this.enchantments.removeInt(enchantment); } else { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/trading/MerchantOffer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch similarity index 66% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/trading/MerchantOffer.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch index 4ac473b3e..d173c48d1 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/trading/MerchantOffer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/trading/MerchantOffer.java b/net/minecraft/world/item/trading/MerchantOffer.java -index 6afeb92c2e00ca5b945b7c7de9257bd741d53c3d..3e2a1b3f1098bf4f45fed76b6ca4f9a3d5add6ee 100644 --- a/net/minecraft/world/item/trading/MerchantOffer.java +++ b/net/minecraft/world/item/trading/MerchantOffer.java -@@ -143,8 +143,13 @@ public class MerchantOffer { +@@ -143,8 +_,13 @@ } public void updateDemand() { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/BaseSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/BaseSpawner.java.patch similarity index 53% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/BaseSpawner.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/BaseSpawner.java.patch index 24a15417f..7e004e6aa 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/BaseSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/BaseSpawner.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/BaseSpawner.java b/net/minecraft/world/level/BaseSpawner.java -index 8a46a80f93ae817c72dfcb8f1c1ed29c1ae95f7b..77b0a2705460b71f6ec293d3af009a1eddc63857 100644 --- a/net/minecraft/world/level/BaseSpawner.java +++ b/net/minecraft/world/level/BaseSpawner.java -@@ -62,6 +62,7 @@ public abstract class BaseSpawner { +@@ -60,6 +_,7 @@ } public boolean isNearPlayer(Level level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/EntityGetter.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/EntityGetter.java.patch similarity index 58% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/EntityGetter.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/EntityGetter.java.patch index cf9393378..a2b6b7872 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/EntityGetter.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/EntityGetter.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java -index 9175a7e4e6076626cb46144c5858c2f2474f1858..452b6df03152dbd2311774bf4872983d3df92665 100644 --- a/net/minecraft/world/level/EntityGetter.java +++ b/net/minecraft/world/level/EntityGetter.java -@@ -185,7 +185,7 @@ public interface EntityGetter extends ca.spottedleaf.moonrise.patches.chunk_syst +@@ -182,7 +_,7 @@ default boolean hasNearbyAlivePlayer(double x, double y, double z, double distance) { for (Player player : this.players()) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/Level.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch similarity index 85% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/Level.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch index 94227cbea..da377b9dc 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/Level.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index d225267b1b07854b76c88ce461d7817a86d023a0..1eac6ee2d3bb584a94a999f4f88c46b4d4a19977 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -166,11 +166,55 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -165,11 +_,55 @@ } // Paper end - add paper world config @@ -64,7 +56,7 @@ index d225267b1b07854b76c88ce461d7817a86d023a0..1eac6ee2d3bb584a94a999f4f88c46b4 public CraftWorld getWorld() { return this.world; } -@@ -846,6 +890,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -844,6 +_,8 @@ // Paper end - getblock optimisations - cache world height/sections this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config @@ -73,7 +65,7 @@ index d225267b1b07854b76c88ce461d7817a86d023a0..1eac6ee2d3bb584a94a999f4f88c46b4 this.generator = generator; this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment); -@@ -2113,4 +2159,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -2071,4 +_,14 @@ return this.id; } } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/NaturalSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch similarity index 65% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/NaturalSpawner.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch index dd29bee93..cd3f187c2 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/NaturalSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java -index 911c5099a2bbb3e955c9314219114873642c7355..4c3fa61566ecabf8eccea32f10aabfa7c961e4c5 100644 --- a/net/minecraft/world/level/NaturalSpawner.java +++ b/net/minecraft/world/level/NaturalSpawner.java -@@ -263,7 +263,7 @@ public final class NaturalSpawner { +@@ -209,7 +_,7 @@ mutableBlockPos.set(x, y, z); double d = x + 0.5; double d1 = z + 0.5; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/ServerExplosion.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch similarity index 80% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/ServerExplosion.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch index 607c1a7db..898c4dda1 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/ServerExplosion.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java -index 1c521f9f32340cf75310686c90777e521ac3ae5c..c0c87b7c8e0b6b941fe8a63dc361504e94459d86 100644 --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java -@@ -636,6 +636,23 @@ public class ServerExplosion implements Explosion { +@@ -640,6 +_,23 @@ this.directMappedBlockCache = new ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache[BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH]; this.mutablePos = new BlockPos.MutableBlockPos(); // Paper end - collision optimisations diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/AnvilBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AnvilBlock.java.patch similarity index 89% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/AnvilBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AnvilBlock.java.patch index 866c868f3..e604b9e74 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/AnvilBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AnvilBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/AnvilBlock.java b/net/minecraft/world/level/block/AnvilBlock.java -index f92c3b35e51c154625fb6c84b8f4980fffb56b19..d2af657b731962a602d22297da549fbf0aa55e8a 100644 --- a/net/minecraft/world/level/block/AnvilBlock.java +++ b/net/minecraft/world/level/block/AnvilBlock.java -@@ -54,6 +54,53 @@ public class AnvilBlock extends FallingBlock { +@@ -54,6 +_,53 @@ return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getClockWise()); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/AzaleaBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AzaleaBlock.java.patch similarity index 70% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/AzaleaBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AzaleaBlock.java.patch index 45c279c8a..066e2cfd6 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/AzaleaBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AzaleaBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/AzaleaBlock.java b/net/minecraft/world/level/block/AzaleaBlock.java -index 435a455ad2ec3dfb142d570a51a720bc6c49dac3..32a1dc20202bad7a15794e98cdc1bf2fb2ad5308 100644 --- a/net/minecraft/world/level/block/AzaleaBlock.java +++ b/net/minecraft/world/level/block/AzaleaBlock.java -@@ -50,6 +50,20 @@ public class AzaleaBlock extends VegetationBlock implements BonemealableBlock { +@@ -50,6 +_,20 @@ @Override public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java.patch new file mode 100644 index 000000000..fd6497469 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java ++++ b/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java +@@ -39,6 +_,7 @@ + } + + protected static boolean scanForWater(BlockState state, BlockGetter level, BlockPos pos) { ++ if (!((net.minecraft.world.level.LevelAccessor) level).getMinecraftWorld().purpurConfig.coralDieOutsideWater) return true; // Purpur - Config to not let coral die + if (state.getValue(WATERLOGGED)) { + return true; + } else { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BedBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch similarity index 68% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BedBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch index c30fbd0cd..c9f3ab128 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BedBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/BedBlock.java b/net/minecraft/world/level/block/BedBlock.java -index 63768a73c04060fbc4aceb734ba32bc203514017..7111d6f2693efc1628d4c09e9717604a84ae0e52 100644 --- a/net/minecraft/world/level/block/BedBlock.java +++ b/net/minecraft/world/level/block/BedBlock.java -@@ -98,7 +98,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -100,7 +_,7 @@ } Vec3 center = pos.getCenter(); @@ -16,17 +8,17 @@ index 63768a73c04060fbc4aceb734ba32bc203514017..7111d6f2693efc1628d4c09e9717604a + if (level.purpurConfig.bedExplode) level.explode(null, level.damageSources().badRespawnPointExplosion(center), null, center, (float) level.purpurConfig.bedExplosionPower, level.purpurConfig.bedExplosionFire, level.purpurConfig.bedExplosionEffect); // Purpur - Implement bed explosion options return InteractionResult.SUCCESS_SERVER; } else if (state.getValue(OCCUPIED)) { - if (!BedBlock.canSetSpawn(level)) return this.explodeBed(state, level, pos); // Paper - check explode first -@@ -146,7 +146,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock + if (bedRule.explodes()) return this.explodeBed(state, level, pos); // Paper - check explode first +@@ -153,7 +_,7 @@ } Vec3 center = pos.getCenter(); - level.explode(null, level.damageSources().badRespawnPointExplosion(center).causingBlockSnapshot(blockState), null, center, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state + if (level.purpurConfig.bedExplode) level.explode(null, level.damageSources().badRespawnPointExplosion(center).causingBlockSnapshot(blockState), null, center, (float) level.purpurConfig.bedExplosionPower, level.purpurConfig.bedExplosionFire, level.purpurConfig.bedExplosionEffect); // CraftBukkit - add state // Purpur - Implement bed explosion options return InteractionResult.SUCCESS_SERVER; - } + } // CraftBukkit end -@@ -167,7 +167,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -170,7 +_,7 @@ @Override public void fallOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch new file mode 100644 index 000000000..5db370adf --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/BigDripleafBlock.java ++++ b/net/minecraft/world/level/block/BigDripleafBlock.java +@@ -251,7 +_,7 @@ + playTiltSound(level, pos, sound); + } + +- int _int = DELAY_UNTIL_NEXT_TILT_STATE.getInt(tilt); ++ int _int = level.purpurConfig.bigDripleafTiltDelay.getOrDefault(tilt, -1); // Purpur - Big dripleaf tilt delay + if (_int != -1) { + level.scheduleTick(pos, this, _int); + } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/Block.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Block.java.patch similarity index 85% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/Block.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Block.java.patch index 1b5236e87..7ea2b64af 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/Block.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Block.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/Block.java b/net/minecraft/world/level/block/Block.java -index 572fcb33b14d16334e2ab92ddf8699f1ba975aff..9d913ac1dcd6eb48b1f1bff6a88ac2bd5e75376b 100644 --- a/net/minecraft/world/level/block/Block.java +++ b/net/minecraft/world/level/block/Block.java -@@ -103,6 +103,10 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -113,6 +_,10 @@ public static final int UPDATE_LIMIT = 512; protected final StateDefinition stateDefinition; private BlockState defaultBlockState; @@ -19,7 +11,7 @@ index 572fcb33b14d16334e2ab92ddf8699f1ba975aff..9d913ac1dcd6eb48b1f1bff6a88ac2bd // Paper start - Protect Bedrock and End Portal/Frames from being destroyed public final boolean isDestroyable() { return io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPermanentBlockBreakExploits || -@@ -384,7 +388,7 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -395,7 +_,7 @@ event.setExpToDrop(block.getExpDrop(state, serverLevel, pos, net.minecraft.world.item.ItemStack.EMPTY, true)); // Paper - Properly handle xp dropping event.callEvent(); for (org.bukkit.inventory.ItemStack drop : event.getDrops()) { @@ -28,7 +20,7 @@ index 572fcb33b14d16334e2ab92ddf8699f1ba975aff..9d913ac1dcd6eb48b1f1bff6a88ac2bd } state.spawnAfterBreak(serverLevel, pos, ItemStack.EMPTY, false); // Paper - Properly handle xp dropping block.popExperience(serverLevel, pos, event.getExpToDrop()); // Paper - Properly handle xp dropping -@@ -402,7 +406,7 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -413,7 +_,7 @@ public static void dropResources(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity) { if (level instanceof ServerLevel) { @@ -37,7 +29,7 @@ index 572fcb33b14d16334e2ab92ddf8699f1ba975aff..9d913ac1dcd6eb48b1f1bff6a88ac2bd state.spawnAfterBreak((ServerLevel)level, pos, ItemStack.EMPTY, true); } } -@@ -414,11 +418,30 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -425,11 +_,30 @@ public static void dropResources(BlockState state, Level level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity entity, ItemStack tool, boolean dropExperience) { // Paper end - Properly handle xp dropping if (level instanceof ServerLevel) { @@ -69,10 +61,11 @@ index 572fcb33b14d16334e2ab92ddf8699f1ba975aff..9d913ac1dcd6eb48b1f1bff6a88ac2bd public static void popResource(Level level, BlockPos pos, ItemStack stack) { double d = EntityType.ITEM.getHeight() / 2.0; double d1 = pos.getX() + 0.5 + Mth.nextDouble(level.random, -0.25, 0.25); -@@ -499,7 +522,15 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -509,7 +_,15 @@ } public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { +- } + this.placer = placer; // Purpur - Store placer on Block when placed + } + @@ -80,12 +73,12 @@ index 572fcb33b14d16334e2ab92ddf8699f1ba975aff..9d913ac1dcd6eb48b1f1bff6a88ac2bd + @Nullable protected LivingEntity placer = null; + public void forgetPlacer() { + this.placer = null; - } ++ } + // Purpur end - Store placer on Block when placed public boolean isPossibleToRespawnInThis(BlockState state) { return !state.isSolid() && !state.liquid(); -@@ -510,7 +541,7 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -520,7 +_,7 @@ } public void fallOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/Blocks.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch similarity index 59% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/Blocks.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch index e2cecd32c..9c9f12e39 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/Blocks.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java -index e5129823a05843c86d4ef282244502fd515915c0..6df3cd84281ee7948457d170e69bdddbf1219c3c 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java -@@ -6744,6 +6744,7 @@ public class Blocks { +@@ -6806,6 +_,7 @@ BlockBehaviour.Properties.of() .mapColor(MapColor.PLANT) .forceSolidOff() @@ -16,7 +8,7 @@ index e5129823a05843c86d4ef282244502fd515915c0..6df3cd84281ee7948457d170e69bdddb .instabreak() .sound(SoundType.AZALEA) .noOcclusion() -@@ -6755,6 +6756,7 @@ public class Blocks { +@@ -6817,6 +_,7 @@ BlockBehaviour.Properties.of() .mapColor(MapColor.PLANT) .forceSolidOff() diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch similarity index 66% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch index 882584068..6d57a3ee0 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/BubbleColumnBlock.java b/net/minecraft/world/level/block/BubbleColumnBlock.java -index 3d39e5c1bf1bd7c0ae738721d1168cf21b48b877..4673f654871eb9a5998a81cfeebe71b75c9f191f 100644 --- a/net/minecraft/world/level/block/BubbleColumnBlock.java +++ b/net/minecraft/world/level/block/BubbleColumnBlock.java -@@ -99,9 +99,9 @@ public class BubbleColumnBlock extends Block implements BucketPickup { +@@ -99,9 +_,9 @@ if (state.is(Blocks.BUBBLE_COLUMN)) { return state; } else if (state.is(Blocks.SOUL_SAND)) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CactusBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch similarity index 80% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CactusBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch index 3074c56df..4fec7e3b9 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CactusBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/CactusBlock.java b/net/minecraft/world/level/block/CactusBlock.java -index 5ed89812cbc94a3df20d0e74b4569152164c9c2a..7b43592090c2bf2cc78e3c5205237c01079bf0b9 100644 --- a/net/minecraft/world/level/block/CactusBlock.java +++ b/net/minecraft/world/level/block/CactusBlock.java -@@ -22,7 +22,7 @@ import net.minecraft.world.level.pathfinder.PathComputationType; +@@ -22,7 +_,7 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -17,7 +9,7 @@ index 5ed89812cbc94a3df20d0e74b4569152164c9c2a..7b43592090c2bf2cc78e3c5205237c01 public static final MapCodec CODEC = simpleCodec(CactusBlock::new); public static final IntegerProperty AGE = BlockStateProperties.AGE_15; public static final int MAX_AGE = 15; -@@ -117,7 +117,7 @@ public class CactusBlock extends Block { +@@ -117,7 +_,7 @@ protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { for (Direction direction : Direction.Plane.HORIZONTAL) { BlockState blockState = level.getBlockState(pos.relative(direction)); @@ -26,7 +18,7 @@ index 5ed89812cbc94a3df20d0e74b4569152164c9c2a..7b43592090c2bf2cc78e3c5205237c01 return false; } } -@@ -141,4 +141,34 @@ public class CactusBlock extends Block { +@@ -141,4 +_,34 @@ protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) { return false; } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CakeBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch similarity index 59% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CakeBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch index 5d424ebd1..c78b443f8 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CakeBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/CakeBlock.java b/net/minecraft/world/level/block/CakeBlock.java -index cca7bde128f88df4327e6b011c301f60d909bb4d..576e00d1e9eb2a692b1ee0f1086ee0db230d4e7e 100644 --- a/net/minecraft/world/level/block/CakeBlock.java +++ b/net/minecraft/world/level/block/CakeBlock.java -@@ -109,6 +109,7 @@ public class CakeBlock extends Block { +@@ -109,6 +_,7 @@ org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(player, 2 + oldFoodLevel); if (!event.isCancelled()) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CampfireBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch similarity index 52% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CampfireBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch index afcfa75b5..d31073993 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CampfireBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/CampfireBlock.java b/net/minecraft/world/level/block/CampfireBlock.java -index d6aaebacfb9b713dafb718d1e7ade8da8111ebb5..6129f48418532c5b4b4d5515bc75cffb85073984 100644 --- a/net/minecraft/world/level/block/CampfireBlock.java +++ b/net/minecraft/world/level/block/CampfireBlock.java -@@ -124,7 +124,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB +@@ -123,7 +_,7 @@ return this.defaultBlockState() .setValue(WATERLOGGED, flag) .setValue(SIGNAL_FIRE, this.isSmokeSource(level.getBlockState(clickedPos.below()))) diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch similarity index 80% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch index e259c7b39..145b63efa 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/CarvedPumpkinBlock.java b/net/minecraft/world/level/block/CarvedPumpkinBlock.java -index ccb8cf919ce5233eb1de87c35a48c50bef2b1754..dd260cd9134f503856991f723a05c6e8e3bab0a9 100644 --- a/net/minecraft/world/level/block/CarvedPumpkinBlock.java +++ b/net/minecraft/world/level/block/CarvedPumpkinBlock.java -@@ -74,7 +74,7 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { +@@ -67,7 +_,7 @@ if (blockPatternMatch != null) { SnowGolem snowGolem = EntityType.SNOW_GOLEM.create(level, EntitySpawnReason.TRIGGERED); if (snowGolem != null) { @@ -17,7 +9,7 @@ index ccb8cf919ce5233eb1de87c35a48c50bef2b1754..dd260cd9134f503856991f723a05c6e8 return; } } -@@ -84,7 +84,7 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { +@@ -77,7 +_,7 @@ IronGolem ironGolem = EntityType.IRON_GOLEM.create(level, EntitySpawnReason.TRIGGERED); if (ironGolem != null) { ironGolem.setPlayerCreated(true); @@ -26,7 +18,7 @@ index ccb8cf919ce5233eb1de87c35a48c50bef2b1754..dd260cd9134f503856991f723a05c6e8 return; } } -@@ -93,7 +93,7 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { +@@ -86,7 +_,7 @@ if (blockPatternMatch2 != null) { CopperGolem copperGolem = EntityType.COPPER_GOLEM.create(level, EntitySpawnReason.TRIGGERED); if (copperGolem != null) { @@ -35,7 +27,7 @@ index ccb8cf919ce5233eb1de87c35a48c50bef2b1754..dd260cd9134f503856991f723a05c6e8 if (!copperGolem.valid) return; // Paper - entityspawnevent - entity was not added to the world so prevent world mutation this.replaceCopperBlockWithChest(level, blockPatternMatch2); copperGolem.spawn(this.getWeatherStateFromPattern(blockPatternMatch2)); -@@ -112,7 +112,20 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { +@@ -105,7 +_,20 @@ .getAge(); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CauldronBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch similarity index 60% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CauldronBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch index 5e13f415d..6ead2196b 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CauldronBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/CauldronBlock.java b/net/minecraft/world/level/block/CauldronBlock.java -index 523a769ce8f73b2f216d0768ab8f2f9f1bfa949d..703c15dfc3dd0b209502c0a0b75d714318e608a8 100644 --- a/net/minecraft/world/level/block/CauldronBlock.java +++ b/net/minecraft/world/level/block/CauldronBlock.java -@@ -32,8 +32,8 @@ public class CauldronBlock extends AbstractCauldronBlock { +@@ -32,8 +_,8 @@ protected static boolean shouldHandlePrecipitation(Level level, Biome.Precipitation precipitation) { return precipitation == Biome.Precipitation.RAIN diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch similarity index 53% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch index 2d7db8091..a024a56e2 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/CaveVinesBlock.java b/net/minecraft/world/level/block/CaveVinesBlock.java -index f4a4dc14012c110e58b1c9272d80d4b89394d090..da85ec2b88b200fd28d89d9ae35c7319d4b028b7 100644 --- a/net/minecraft/world/level/block/CaveVinesBlock.java +++ b/net/minecraft/world/level/block/CaveVinesBlock.java -@@ -92,4 +92,11 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements CaveVines { +@@ -92,4 +_,11 @@ public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { level.setBlock(pos, state.setValue(BERRIES, true), Block.UPDATE_CLIENTS); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch similarity index 52% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch index 20b348157..54d2fa463 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/ChangeOverTimeBlock.java b/net/minecraft/world/level/block/ChangeOverTimeBlock.java -index ba7dbfa3f95bf93f3e50b17aa48b772a3047b74d..d42062a86c1278b71bc085cc3fb29a69039873de 100644 --- a/net/minecraft/world/level/block/ChangeOverTimeBlock.java +++ b/net/minecraft/world/level/block/ChangeOverTimeBlock.java -@@ -51,7 +51,7 @@ public interface ChangeOverTimeBlock> { +@@ -51,7 +_,7 @@ } float f = (float)(i1 + 1) / (i1 + i + 1); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ChestBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch similarity index 50% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ChestBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch index 941c585d1..7da971fbb 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ChestBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/ChestBlock.java b/net/minecraft/world/level/block/ChestBlock.java -index 3cce87fd6e1d9d65d6b28bf44dd218541e815788..bf75ac5cd4074a13581baaa87e93463c83cca2e6 100644 --- a/net/minecraft/world/level/block/ChestBlock.java +++ b/net/minecraft/world/level/block/ChestBlock.java -@@ -369,6 +369,7 @@ public class ChestBlock extends AbstractChestBlock implements +@@ -370,6 +_,7 @@ } public static boolean isBlockedChestByBlock(BlockGetter level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ComposterBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch similarity index 82% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ComposterBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch index e364b3e7a..f2b522991 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ComposterBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/ComposterBlock.java b/net/minecraft/world/level/block/ComposterBlock.java -index 0707e08970a325f6a21f3fc2f48c0b7bfbcbcd45..90ef0ea828303ccfa568c6acb3975c48f628261a 100644 --- a/net/minecraft/world/level/block/ComposterBlock.java +++ b/net/minecraft/world/level/block/ComposterBlock.java -@@ -250,17 +250,27 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -250,23 +_,52 @@ ) { int levelValue = state.getValue(LEVEL); if (levelValue < 8 && COMPOSTABLES.containsKey(stack.getItem())) { @@ -22,11 +14,12 @@ index 0707e08970a325f6a21f3fc2f48c0b7bfbcbcd45..90ef0ea828303ccfa568c6acb3975c48 - level.levelEvent(LevelEvent.COMPOSTER_FILL, pos, state != blockState ? 1 : 0); - player.awardStat(Stats.ITEM_USED.get(stack.getItem())); - stack.consume(1, player); +- } + // Purpur start - sneak to bulk process composter + BlockState newState = process(levelValue, player, state, level, pos, stack); + if (newState == null) { + return InteractionResult.PASS; - } ++ } + if (level.purpurConfig.composterBulkProcess && player.isShiftKeyDown() && newState != state) { + BlockState oldState; + int oldCount, newCount, oldLevel, newLevel; @@ -46,10 +39,10 @@ index 0707e08970a325f6a21f3fc2f48c0b7bfbcbcd45..90ef0ea828303ccfa568c6acb3975c48 return InteractionResult.SUCCESS; } else { -@@ -268,6 +278,25 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } } - ++ + // Purpur start - sneak to bulk process composter + private static @Nullable BlockState process(int levelValue, Player player, BlockState state, Level level, BlockPos pos, ItemStack stack) { + if (levelValue < 7 && !level.isClientSide()) { @@ -68,7 +61,6 @@ index 0707e08970a325f6a21f3fc2f48c0b7bfbcbcd45..90ef0ea828303ccfa568c6acb3975c48 + return state; + } + // Purpur end - Sneak to bulk process composter -+ + @Override protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { - int levelValue = state.getValue(LEVEL); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CoralBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch similarity index 54% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CoralBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch index 1e7290b52..690cfe031 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CoralBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/CoralBlock.java b/net/minecraft/world/level/block/CoralBlock.java -index a43ab4e437ea53be5542d9824235ae3743da5402..d3867b86bf21107c51de76b170cdab35ed2b0ecf 100644 --- a/net/minecraft/world/level/block/CoralBlock.java +++ b/net/minecraft/world/level/block/CoralBlock.java -@@ -65,6 +65,7 @@ public class CoralBlock extends Block { +@@ -65,6 +_,7 @@ } protected boolean scanForWater(BlockGetter level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CropBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch similarity index 70% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CropBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch index 43ebf1d41..1db271458 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/CropBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch @@ -1,23 +1,15 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/CropBlock.java b/net/minecraft/world/level/block/CropBlock.java -index fe573b6fe5c231ed78c063954e35de65edad7342..4d7e01fea4bac6cf71cbca3deae632df0f738497 100644 --- a/net/minecraft/world/level/block/CropBlock.java +++ b/net/minecraft/world/level/block/CropBlock.java -@@ -169,7 +169,7 @@ public class CropBlock extends VegetationBlock implements BonemealableBlock { +@@ -169,7 +_,7 @@ @Override protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean pastEdges) { if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent -- if (level instanceof ServerLevel serverLevel && entity instanceof Ravager && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit -+ if (level instanceof ServerLevel serverLevel && entity instanceof Ravager && serverLevel.purpurConfig.ravagerGriefableBlocks.contains(serverLevel.getBlockState(pos).getBlock()) && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit // Purpur - Configurable ravager griefable blocks list +- if (level instanceof ServerLevel serverLevel && entity instanceof Ravager && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !serverLevel.getGameRules().get(GameRules.MOB_GRIEFING))) { // CraftBukkit ++ if (level instanceof ServerLevel serverLevel && entity instanceof Ravager && serverLevel.purpurConfig.ravagerGriefableBlocks.contains(serverLevel.getBlockState(pos).getBlock()) && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !serverLevel.getGameRules().get(GameRules.MOB_GRIEFING))) { // CraftBukkit // Purpur - Configurable ravager griefable blocks list serverLevel.destroyBlock(pos, true, entity); } -@@ -204,4 +204,15 @@ public class CropBlock extends VegetationBlock implements BonemealableBlock { +@@ -204,4 +_,15 @@ protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(AGE); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/DoorBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch similarity index 75% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/DoorBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch index e10d7fb66..87a008eb0 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/DoorBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/DoorBlock.java b/net/minecraft/world/level/block/DoorBlock.java -index 23e892bb2453617c5fd54360a47bf5fd404609b9..1eba3feeed88281e0bba76b22e35057d80bb6599 100644 --- a/net/minecraft/world/level/block/DoorBlock.java +++ b/net/minecraft/world/level/block/DoorBlock.java -@@ -199,6 +199,7 @@ public class DoorBlock extends Block { +@@ -198,6 +_,7 @@ protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { if (!this.type.canOpenByHand()) { return InteractionResult.PASS; @@ -16,7 +8,7 @@ index 23e892bb2453617c5fd54360a47bf5fd404609b9..1eba3feeed88281e0bba76b22e35057d } else { state = state.cycle(OPEN); level.setBlock(pos, state, Block.UPDATE_CLIENTS | Block.UPDATE_IMMEDIATE); -@@ -287,4 +288,18 @@ public class DoorBlock extends Block { +@@ -286,4 +_,18 @@ public static boolean isWoodenDoor(BlockState state) { return state.getBlock() instanceof DoorBlock doorBlock && doorBlock.type().canOpenByHand(); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DragonEggBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DragonEggBlock.java.patch new file mode 100644 index 000000000..d08f61da6 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DragonEggBlock.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/level/block/DragonEggBlock.java ++++ b/net/minecraft/world/level/block/DragonEggBlock.java +@@ -46,6 +_,7 @@ + } + + private void teleport(BlockState state, Level level, BlockPos pos) { ++ if (!level.purpurConfig.dragonEggTeleport) return; // Purpur - Option to disable dragon egg teleporting + WorldBorder worldBorder = level.getWorldBorder(); + + for (int i = 0; i < 1000; i++) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/FarmBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch similarity index 82% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/FarmBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch index d40b8a461..6ee873e25 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/FarmBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch @@ -1,23 +1,15 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/FarmBlock.java b/net/minecraft/world/level/block/FarmBlock.java -index a31ac95237515b874f59941ec24c74e2c357b3d8..9883e6d1a1b76155c8ba1817fda6615b4742e18e 100644 --- a/net/minecraft/world/level/block/FarmBlock.java +++ b/net/minecraft/world/level/block/FarmBlock.java -@@ -112,7 +112,7 @@ public class FarmBlock extends Block { +@@ -112,7 +_,7 @@ public void fallOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance) { super.fallOn(level, state, pos, entity, fallDistance); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage. if (level instanceof ServerLevel serverLevel - && level.random.nextFloat() < fallDistance - 0.5 + && (serverLevel.purpurConfig.farmlandTrampleHeight >= 0D ? fallDistance >= serverLevel.purpurConfig.farmlandTrampleHeight : level.random.nextFloat() < fallDistance - 0.5) // Purpur - Configurable farmland trample height && entity instanceof LivingEntity - && (entity instanceof Player || serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) + && (entity instanceof Player || serverLevel.getGameRules().get(GameRules.MOB_GRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) { -@@ -129,6 +129,28 @@ public class FarmBlock extends Block { +@@ -129,6 +_,28 @@ return; } @@ -46,7 +38,7 @@ index a31ac95237515b874f59941ec24c74e2c357b3d8..9883e6d1a1b76155c8ba1817fda6615b if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.DIRT.defaultBlockState())) { return; } -@@ -177,7 +199,7 @@ public class FarmBlock extends Block { +@@ -177,7 +_,7 @@ } } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch similarity index 77% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch index bdfe85808..7dd50302a 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/GrowingPlantHeadBlock.java b/net/minecraft/world/level/block/GrowingPlantHeadBlock.java -index fe11f3ec82ebdbdf3d024d7273fb16b6823b1ece..daaf0ddee9192fa24a70954ce52b381560fcbc1f 100644 --- a/net/minecraft/world/level/block/GrowingPlantHeadBlock.java +++ b/net/minecraft/world/level/block/GrowingPlantHeadBlock.java -@@ -34,12 +34,12 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements +@@ -34,12 +_,12 @@ @Override public BlockState getStateForPlacement(RandomSource random) { @@ -23,7 +15,7 @@ index fe11f3ec82ebdbdf3d024d7273fb16b6823b1ece..daaf0ddee9192fa24a70954ce52b3815 } @Override -@@ -55,7 +55,7 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements +@@ -55,7 +_,7 @@ } else if (this == Blocks.CAVE_VINES) { modifier = level.spigotConfig.caveVinesModifier; } @@ -32,7 +24,7 @@ index fe11f3ec82ebdbdf3d024d7273fb16b6823b1ece..daaf0ddee9192fa24a70954ce52b3815 // Spigot end BlockPos blockPos = pos.relative(this.growthDirection); if (this.canGrowInto(level.getBlockState(blockPos))) { -@@ -75,11 +75,11 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements +@@ -75,11 +_,11 @@ } public BlockState getMaxAgeState(BlockState state) { @@ -46,7 +38,7 @@ index fe11f3ec82ebdbdf3d024d7273fb16b6823b1ece..daaf0ddee9192fa24a70954ce52b3815 } protected BlockState updateBodyAfterConvertedFromHead(BlockState head, BlockState body) { -@@ -137,13 +137,13 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements +@@ -137,13 +_,13 @@ @Override public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { BlockPos blockPos = pos.relative(this.growthDirection); @@ -62,7 +54,7 @@ index fe11f3ec82ebdbdf3d024d7273fb16b6823b1ece..daaf0ddee9192fa24a70954ce52b3815 } } -@@ -155,4 +155,6 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements +@@ -155,4 +_,6 @@ protected GrowingPlantHeadBlock getHeadBlock() { return this; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/HayBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/HayBlock.java.patch new file mode 100644 index 000000000..1b21c6e0a --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/HayBlock.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/level/block/HayBlock.java ++++ b/net/minecraft/world/level/block/HayBlock.java +@@ -23,6 +_,6 @@ + + @Override + public void fallOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance) { +- entity.causeFallDamage(fallDistance, 0.2F, level.damageSources().fall()); ++ super.fallOn(level, state, pos, entity, fallDistance); // Purpur - Configurable block fall damage modifiers + } + } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/KelpBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/KelpBlock.java.patch new file mode 100644 index 000000000..dd74c4921 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/KelpBlock.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/world/level/block/KelpBlock.java ++++ b/net/minecraft/world/level/block/KelpBlock.java +@@ -71,4 +_,11 @@ + protected FluidState getFluidState(BlockState state) { + return Fluids.WATER.getSource(false); + } ++ ++ // Purpur start - kelp vines configurable max growth age ++ @Override ++ public int getMaxGrowthAge() { ++ return org.purpurmc.purpur.PurpurConfig.kelpMaxGrowthAge; ++ } ++ // Purpur end - kelp vines configurable max growth age + } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/LiquidBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/LiquidBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch index 9927c6ba0..449e5e6c6 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/LiquidBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/LiquidBlock.java b/net/minecraft/world/level/block/LiquidBlock.java -index 70cb8b2cf79833d8b5f9cee6d9c5495e5b706078..8c00026651da489ab954710b59d5a03bf54ffd0d 100644 --- a/net/minecraft/world/level/block/LiquidBlock.java +++ b/net/minecraft/world/level/block/LiquidBlock.java -@@ -138,7 +138,7 @@ public class LiquidBlock extends Block implements BucketPickup { +@@ -138,7 +_,7 @@ @Override protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) { @@ -17,7 +9,7 @@ index 70cb8b2cf79833d8b5f9cee6d9c5495e5b706078..8c00026651da489ab954710b59d5a03b level.scheduleTick(pos, state.getFluidState().getType(), this.getFlowSpeed(level, pos)); // Paper - Configurable speed for water flowing over lava } } -@@ -175,7 +175,7 @@ public class LiquidBlock extends Block implements BucketPickup { +@@ -175,7 +_,7 @@ BlockState neighborState, RandomSource random ) { @@ -26,7 +18,7 @@ index 70cb8b2cf79833d8b5f9cee6d9c5495e5b706078..8c00026651da489ab954710b59d5a03b scheduledTickAccess.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(level)); } -@@ -184,7 +184,7 @@ public class LiquidBlock extends Block implements BucketPickup { +@@ -184,7 +_,7 @@ @Override protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/MagmaBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch similarity index 57% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/MagmaBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch index e73c01132..f9d8ca928 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/MagmaBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/MagmaBlock.java b/net/minecraft/world/level/block/MagmaBlock.java -index 71344cb2580fb9a3cd523e25fb1a245711e275dd..bec06566342663479ee8342b7e5ceec61758c448 100644 --- a/net/minecraft/world/level/block/MagmaBlock.java +++ b/net/minecraft/world/level/block/MagmaBlock.java -@@ -28,7 +28,7 @@ public class MagmaBlock extends Block { +@@ -28,7 +_,7 @@ @Override public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch similarity index 58% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch index fe15047bd..c6e751612 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch @@ -1,23 +1,15 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java -index d3f0a61c0c91d3a6a1dc4e59d57743ba89a9c19a..094d2031f9a184c06c7bdcc1d1d8a72ced462358 100644 --- a/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -67,7 +67,7 @@ public class NetherPortalBlock extends Block implements Portal { +@@ -68,7 +_,7 @@ protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { - if (level.spigotConfig.enableZombiePigmenPortalSpawns && level.dimensionType().natural() // Spigot - && level.isSpawningMonsters() + if (level.spigotConfig.enableZombiePigmenPortalSpawns && level.isSpawningMonsters() // Spigot + && level.environmentAttributes().getValue(EnvironmentAttributes.NETHER_PORTAL_SPAWNS_PIGLINS, pos) - && random.nextInt(2000) < level.getDifficulty().getId() + && random.nextInt(level.purpurConfig.piglinPortalSpawnModifier) < level.getDifficulty().getId() // Purpur - Piglin portal spawn modifier && level.anyPlayerCloseEnoughForSpawning(pos)) { while (level.getBlockState(pos).is(this)) { pos = pos.below(); -@@ -125,7 +125,7 @@ public class NetherPortalBlock extends Block implements Portal { +@@ -126,7 +_,7 @@ @Override public int getPortalTransitionTime(ServerLevel level, Entity entity) { return entity instanceof Player player @@ -25,4 +17,4 @@ index d3f0a61c0c91d3a6a1dc4e59d57743ba89a9c19a..094d2031f9a184c06c7bdcc1d1d8a72c + ? player.canPortalInstant ? 1 : Math.max( // Purpur - Add portal permission bypass 0, level.getGameRules() - .getInt( + .get(player.getAbilities().invulnerable ? GameRules.PLAYERS_NETHER_PORTAL_CREATIVE_DELAY : GameRules.PLAYERS_NETHER_PORTAL_DEFAULT_DELAY) diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NetherWartBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch similarity index 81% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NetherWartBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch index 60db1877f..362dae20a 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NetherWartBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/NetherWartBlock.java b/net/minecraft/world/level/block/NetherWartBlock.java -index a8cb58de6223006150bc49b95e5964b8fc42cecc..d25e2a37abb5e4c98116048fe2e96194149763ca 100644 --- a/net/minecraft/world/level/block/NetherWartBlock.java +++ b/net/minecraft/world/level/block/NetherWartBlock.java -@@ -16,7 +16,7 @@ import net.minecraft.world.level.block.state.properties.IntegerProperty; +@@ -16,7 +_,7 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -17,7 +9,7 @@ index a8cb58de6223006150bc49b95e5964b8fc42cecc..d25e2a37abb5e4c98116048fe2e96194 public static final MapCodec CODEC = simpleCodec(NetherWartBlock::new); public static final int MAX_AGE = 3; public static final IntegerProperty AGE = BlockStateProperties.AGE_3; -@@ -65,4 +65,34 @@ public class NetherWartBlock extends VegetationBlock { +@@ -65,4 +_,34 @@ protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(AGE); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NoteBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch similarity index 59% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NoteBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch index c0bb2d85d..42c3d0b22 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/NoteBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/NoteBlock.java b/net/minecraft/world/level/block/NoteBlock.java -index 99cee267b12497b76beb17cbf02f099dac18c0e9..b73340e78fc3a6bc9481ee5395e34b7c55b8f429 100644 --- a/net/minecraft/world/level/block/NoteBlock.java +++ b/net/minecraft/world/level/block/NoteBlock.java -@@ -101,7 +101,7 @@ public class NoteBlock extends Block { +@@ -101,7 +_,7 @@ } private void playNote(@Nullable Entity entity, BlockState state, Level level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ObserverBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch similarity index 54% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ObserverBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch index 2e522e670..3202a8cee 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/ObserverBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/ObserverBlock.java b/net/minecraft/world/level/block/ObserverBlock.java -index 3c12d8e23f20b666b0005e597ba2e803c02d5d78..76ef1e378f7213fcb82f27598c443de3c6587d95 100644 --- a/net/minecraft/world/level/block/ObserverBlock.java +++ b/net/minecraft/world/level/block/ObserverBlock.java -@@ -81,6 +81,7 @@ public class ObserverBlock extends DirectionalBlock { +@@ -81,6 +_,7 @@ RandomSource random ) { if (state.getValue(FACING) == direction && !state.getValue(POWERED)) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch index 227efb5fd..6843415d9 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/PointedDripstoneBlock.java b/net/minecraft/world/level/block/PointedDripstoneBlock.java -index a2b0498677e7fc070c006f62ba228a05ecdcf0c8..0331eb06f4b113479f4f1f8059cd511356d14048 100644 --- a/net/minecraft/world/level/block/PointedDripstoneBlock.java +++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java -@@ -193,20 +193,20 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate +@@ -194,20 +_,20 @@ @VisibleForTesting public static void maybeTransferFluid(BlockState state, ServerLevel level, BlockPos pos, float randChance) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch similarity index 51% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch index 94dfb9178..f6c12cc4c 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/PoweredRailBlock.java b/net/minecraft/world/level/block/PoweredRailBlock.java -index 1d1a2e183624ebae22b966ab59a174e941f139c0..e5b1b5ef643e5bfacd79120f97f15ad8beb8c7ee 100644 --- a/net/minecraft/world/level/block/PoweredRailBlock.java +++ b/net/minecraft/world/level/block/PoweredRailBlock.java -@@ -28,7 +28,7 @@ public class PoweredRailBlock extends BaseRailBlock { +@@ -28,7 +_,7 @@ } protected boolean findPoweredRailSignal(Level level, BlockPos pos, BlockState state, boolean searchForward, int recursionCount) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch index 488e4e20d..fd70f38b5 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/RespawnAnchorBlock.java b/net/minecraft/world/level/block/RespawnAnchorBlock.java -index fad87904eed0d7816c41eb426b5942341d12ed50..f60e7193364433f7d5fadcac4c763a4cb797aabf 100644 --- a/net/minecraft/world/level/block/RespawnAnchorBlock.java +++ b/net/minecraft/world/level/block/RespawnAnchorBlock.java -@@ -161,7 +161,7 @@ public class RespawnAnchorBlock extends Block { +@@ -166,7 +_,7 @@ }; Vec3 center = pos2.getCenter(); level.explode( diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch similarity index 50% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch index d564bb931..4a529408c 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch @@ -1,17 +1,9 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/SculkShriekerBlock.java b/net/minecraft/world/level/block/SculkShriekerBlock.java -index 465d13a748b5b6773bc0ee26ac3eda582c9f5bcd..043dcdb5243c00b64fc0b0c84741d8397fb27296 100644 --- a/net/minecraft/world/level/block/SculkShriekerBlock.java +++ b/net/minecraft/world/level/block/SculkShriekerBlock.java -@@ -118,7 +118,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo - @Nullable +@@ -116,7 +_,7 @@ + @Override - public BlockState getStateForPlacement(BlockPlaceContext context) { + public @Nullable BlockState getStateForPlacement(BlockPlaceContext context) { - return this.defaultBlockState().setValue(WATERLOGGED, context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER); + return this.defaultBlockState().setValue(WATERLOGGED, context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER).setValue(SculkShriekerBlock.CAN_SUMMON, context.getLevel().purpurConfig.sculkShriekerCanSummonDefault); // Purpur - Config for sculk shrieker can_summon state } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SlabBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SlabBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch index 6153e8c63..d26a15acf 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SlabBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/SlabBlock.java b/net/minecraft/world/level/block/SlabBlock.java -index a71d72147db9766fa16bdb6254d8eb6f2f7dba7b..66b9862563932faf0044810bde7bd3fb522c109b 100644 --- a/net/minecraft/world/level/block/SlabBlock.java +++ b/net/minecraft/world/level/block/SlabBlock.java -@@ -144,4 +144,25 @@ public class SlabBlock extends Block implements SimpleWaterloggedBlock { +@@ -143,4 +_,25 @@ return false; } } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch similarity index 56% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch index 99ad56d82..ca87324a4 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/SnowLayerBlock.java b/net/minecraft/world/level/block/SnowLayerBlock.java -index a419b295579c17b012cf3a8718d3fac96684c89b..a7cfe611171b82c4dc0fffb254fa891f1393df7c 100644 --- a/net/minecraft/world/level/block/SnowLayerBlock.java +++ b/net/minecraft/world/level/block/SnowLayerBlock.java -@@ -76,6 +76,7 @@ public class SnowLayerBlock extends Block { +@@ -76,6 +_,7 @@ @Override protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { BlockState blockState = level.getBlockState(pos.below()); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SpawnerBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch similarity index 89% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SpawnerBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch index d028c2640..80b4881ec 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SpawnerBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch @@ -1,22 +1,14 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/SpawnerBlock.java b/net/minecraft/world/level/block/SpawnerBlock.java -index fda8626dc32cf8d1d42be2e30c28a53ad8808212..1eb37ed7fe5b5ab6a290016bee923f6583d6cd63 100644 --- a/net/minecraft/world/level/block/SpawnerBlock.java +++ b/net/minecraft/world/level/block/SpawnerBlock.java -@@ -14,6 +14,7 @@ import net.minecraft.world.level.block.state.BlockBehaviour; - import net.minecraft.world.level.block.state.BlockState; +@@ -14,6 +_,7 @@ + import org.jspecify.annotations.Nullable; public class SpawnerBlock extends BaseEntityBlock { + private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger(); public static final MapCodec CODEC = simpleCodec(SpawnerBlock::new); @Override -@@ -38,6 +39,62 @@ public class SpawnerBlock extends BaseEntityBlock { +@@ -37,6 +_,62 @@ ); } @@ -79,7 +71,7 @@ index fda8626dc32cf8d1d42be2e30c28a53ad8808212..1eb37ed7fe5b5ab6a290016bee923f65 @Override protected void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) { super.spawnAfterBreak(state, level, pos, stack, dropExperience); -@@ -46,6 +103,7 @@ public class SpawnerBlock extends BaseEntityBlock { +@@ -45,6 +_,7 @@ @Override public int getExpDrop(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SpongeBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch similarity index 80% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SpongeBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch index 5f090f4b5..ab343ffb3 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SpongeBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/SpongeBlock.java b/net/minecraft/world/level/block/SpongeBlock.java -index c4d527cb37c940e7c6edab18d38e679c0f8cd9ac..205a5024e29e4119af35586fb526176ed72ac4bb 100644 --- a/net/minecraft/world/level/block/SpongeBlock.java +++ b/net/minecraft/world/level/block/SpongeBlock.java -@@ -53,8 +53,8 @@ public class SpongeBlock extends Block { +@@ -53,8 +_,8 @@ org.bukkit.craftbukkit.util.BlockStateListPopulator blockList = new org.bukkit.craftbukkit.util.BlockStateListPopulator(level); // CraftBukkit - Use BlockStateListPopulator BlockPos.breadthFirstTraversal( pos, @@ -19,7 +11,7 @@ index c4d527cb37c940e7c6edab18d38e679c0f8cd9ac..205a5024e29e4119af35586fb526176e (validPos, queueAdder) -> { for (Direction direction : ALL_DIRECTIONS) { queueAdder.accept(validPos.relative(direction)); -@@ -68,7 +68,7 @@ public class SpongeBlock extends Block { +@@ -68,7 +_,7 @@ BlockState blockState = blockList.getBlockState(blockPos); FluidState fluidState = blockList.getFluidState(blockPos); // CraftBukkit end @@ -28,7 +20,7 @@ index c4d527cb37c940e7c6edab18d38e679c0f8cd9ac..205a5024e29e4119af35586fb526176e return BlockPos.TraversalNodeStatus.SKIP; } else if (blockState.getBlock() instanceof BucketPickup bucketPickup && !bucketPickup.pickupBlock(null, blockList, blockPos, blockState).isEmpty()) { // CraftBukkit -@@ -76,6 +76,10 @@ public class SpongeBlock extends Block { +@@ -76,6 +_,10 @@ } else { if (blockState.getBlock() instanceof LiquidBlock) { blockList.setBlock(blockPos, Blocks.AIR.defaultBlockState(), 3); // CraftBukkit diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/StonecutterBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/StonecutterBlock.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/StonecutterBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/StonecutterBlock.java.patch index 26f4b4107..7d7bdf207 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/StonecutterBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/StonecutterBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/StonecutterBlock.java b/net/minecraft/world/level/block/StonecutterBlock.java -index 497470188b62356c30184226e2125abeb7359939..7591e1e55f8821887b3f68d9ce0243a33d4dc680 100644 --- a/net/minecraft/world/level/block/StonecutterBlock.java +++ b/net/minecraft/world/level/block/StonecutterBlock.java -@@ -93,4 +93,14 @@ public class StonecutterBlock extends Block { +@@ -92,4 +_,14 @@ protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) { return false; } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch index 6162757bb..f388f13ce 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/SugarCaneBlock.java b/net/minecraft/world/level/block/SugarCaneBlock.java -index 4caccbd6f5df27e7cacc2cbf405d95ec13eb6cba..1b1442012e32f9dd117c5d2862a1c0323aac3897 100644 --- a/net/minecraft/world/level/block/SugarCaneBlock.java +++ b/net/minecraft/world/level/block/SugarCaneBlock.java -@@ -19,7 +19,7 @@ import net.minecraft.world.level.material.FluidState; +@@ -19,7 +_,7 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -17,7 +9,7 @@ index 4caccbd6f5df27e7cacc2cbf405d95ec13eb6cba..1b1442012e32f9dd117c5d2862a1c032 public static final MapCodec CODEC = simpleCodec(SugarCaneBlock::new); public static final IntegerProperty AGE = BlockStateProperties.AGE_15; private static final VoxelShape SHAPE = Block.column(12.0, 0.0, 16.0); -@@ -112,4 +112,34 @@ public class SugarCaneBlock extends Block { +@@ -112,4 +_,34 @@ protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(AGE); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch similarity index 64% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch index 24de4d9f5..3b647875a 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch @@ -1,30 +1,13 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/TurtleEggBlock.java b/net/minecraft/world/level/block/TurtleEggBlock.java -index b176633c58e3e0a0e898ca8d59948fd3ad2bbcdc..6fd922a7cf1c9679344af91e817469350b01de17 100644 --- a/net/minecraft/world/level/block/TurtleEggBlock.java +++ b/net/minecraft/world/level/block/TurtleEggBlock.java -@@ -156,7 +156,7 @@ public class TurtleEggBlock extends Block { - - private boolean shouldUpdateHatchLevel(Level level) { - float timeOfDay = level.getTimeOfDay(1.0F); -- return timeOfDay < 0.69 && timeOfDay > 0.65 || level.random.nextInt(500) == 0; -+ return timeOfDay < 0.69 && timeOfDay > 0.65 || level.random.nextInt(level.purpurConfig.turtleEggsRandomTickCrackChance) == 0; // Purpur - Turtle eggs random tick crack chance - } - - @Override -@@ -189,9 +189,32 @@ public class TurtleEggBlock extends Block { +@@ -189,9 +_,32 @@ } private boolean canDestroyEgg(ServerLevel level, Entity entity) { - return !(entity instanceof Turtle) - && !(entity instanceof Bat) - && entity instanceof LivingEntity -- && (entity instanceof Player || level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)); +- && (entity instanceof Player || level.getGameRules().get(GameRules.MOB_GRIEFING)); + // Purpur start - Add turtle egg block options + if (entity instanceof Turtle || entity instanceof Bat) { + return false; @@ -50,7 +33,7 @@ index b176633c58e3e0a0e898ca8d59948fd3ad2bbcdc..6fd922a7cf1c9679344af91e81746935 + // Purpur end - Option to disable turtle egg trampling with feather falling + if (entity instanceof Player) return true; + -+ return level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); ++ return level.getGameRules().get(GameRules.MOB_GRIEFING); + // Purpur end - Add turtle egg block options } } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch similarity index 50% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch index 208d208c6..89633d8f7 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/TwistingVinesBlock.java b/net/minecraft/world/level/block/TwistingVinesBlock.java -index afb77747ea6966c435aca4b667bfbbc909f52232..361aaca76ae0375782310af0e03241625f08f7bd 100644 --- a/net/minecraft/world/level/block/TwistingVinesBlock.java +++ b/net/minecraft/world/level/block/TwistingVinesBlock.java -@@ -34,4 +34,11 @@ public class TwistingVinesBlock extends GrowingPlantHeadBlock { +@@ -34,4 +_,11 @@ protected boolean canGrowInto(BlockState state) { return NetherVines.isValidGrowthState(state); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/VegetationBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/VegetationBlock.java.patch similarity index 78% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/VegetationBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/VegetationBlock.java.patch index 19e3ef55b..af22ad6c3 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/VegetationBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/VegetationBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/VegetationBlock.java b/net/minecraft/world/level/block/VegetationBlock.java -index 0aa7c1084fd6ed35260469572cdd914d87f3922a..a1b5e815425fccbc601c8062fcc24598512e47dd 100644 --- a/net/minecraft/world/level/block/VegetationBlock.java +++ b/net/minecraft/world/level/block/VegetationBlock.java -@@ -61,4 +61,24 @@ public abstract class VegetationBlock extends Block { +@@ -61,4 +_,24 @@ protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) { return pathComputationType == PathComputationType.AIR && !this.hasCollision || super.isPathfindable(state, pathComputationType); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch similarity index 50% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch index 9eb6e166c..be28707f2 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/WeepingVinesBlock.java b/net/minecraft/world/level/block/WeepingVinesBlock.java -index f4ff810cdd4206711312a4fffba18f4b30a5701f..96fb69aaf9ed020a328ff609d49f88ab29a69952 100644 --- a/net/minecraft/world/level/block/WeepingVinesBlock.java +++ b/net/minecraft/world/level/block/WeepingVinesBlock.java -@@ -34,4 +34,11 @@ public class WeepingVinesBlock extends GrowingPlantHeadBlock { +@@ -34,4 +_,11 @@ protected boolean canGrowInto(BlockState state) { return NetherVines.isValidGrowthState(state); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch similarity index 59% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch index 77515195c..3958f6bb5 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/WitherSkullBlock.java b/net/minecraft/world/level/block/WitherSkullBlock.java -index 99f130e303d4c6ca275bbdbf4099b65386125f51..00aad961536b8a2a69665f69eb7ce1ed5f884832 100644 --- a/net/minecraft/world/level/block/WitherSkullBlock.java +++ b/net/minecraft/world/level/block/WitherSkullBlock.java -@@ -71,6 +71,7 @@ public class WitherSkullBlock extends SkullBlock { +@@ -69,6 +_,7 @@ ); witherBoss.yBodyRot = blockPatternMatch.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F; witherBoss.makeInvulnerable(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch index d561ad962..db42baa35 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index d8176f1f36f12fe179b5a63e6bf8f290a7a7461d..3dfd539f4453d9c47c99af36e7ba64400fc89a5c 100644 --- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -@@ -187,6 +187,21 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -187,6 +_,21 @@ } ItemStack itemStack = furnace.items.get(1); @@ -30,7 +22,7 @@ index d8176f1f36f12fe179b5a63e6bf8f290a7a7461d..3dfd539f4453d9c47c99af36e7ba6440 ItemStack itemStack1 = furnace.items.get(0); boolean flag1 = !itemStack1.isEmpty(); boolean flag2 = !itemStack.isEmpty(); -@@ -270,6 +285,8 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -270,6 +_,8 @@ if (flag) { setChanged(level, pos, state); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch similarity index 73% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch index b559f0096..c39579e78 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index a517b57c504f7901e11cf435019e8e9bbb1ddbdb..9bfc2afb50a6f776441f666a2fc7ad119a758a7b 100644 --- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -143,6 +143,16 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -138,6 +_,16 @@ public double getEffectRange() { if (this.effectRange < 0) { @@ -25,7 +17,7 @@ index a517b57c504f7901e11cf435019e8e9bbb1ddbdb..9bfc2afb50a6f776441f666a2fc7ad11 return this.levels * 10 + 10; } else { return effectRange; -@@ -172,6 +182,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -166,6 +_,7 @@ int y = pos.getY(); int z = pos.getZ(); BlockPos blockPos; @@ -33,7 +25,7 @@ index a517b57c504f7901e11cf435019e8e9bbb1ddbdb..9bfc2afb50a6f776441f666a2fc7ad11 if (blockEntity.lastCheckY < y) { blockPos = pos; blockEntity.checkingBeamSections = Lists.newArrayList(); -@@ -201,6 +212,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -195,6 +_,7 @@ } } } else { @@ -41,7 +33,7 @@ index a517b57c504f7901e11cf435019e8e9bbb1ddbdb..9bfc2afb50a6f776441f666a2fc7ad11 if (section == null || blockState.getLightBlock() >= 15 && !blockState.is(Blocks.BEDROCK)) { blockEntity.checkingBeamSections.clear(); blockEntity.lastCheckY = height; -@@ -220,7 +232,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -214,7 +_,7 @@ blockEntity.levels = updateBase(level, x, y, z); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch similarity index 76% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch index bdc2346cf..ec70d8701 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -index f0673167d6273c7689cd58ac8f51e51649cb3ad0..67c094369c81080491ec8083c43bac2fef13a0b6 100644 --- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -@@ -77,7 +77,7 @@ public class BeehiveBlockEntity extends BlockEntity { +@@ -79,7 +_,7 @@ "leash", "UUID" ); @@ -17,7 +9,7 @@ index f0673167d6273c7689cd58ac8f51e51649cb3ad0..67c094369c81080491ec8083c43bac2f private static final int MIN_TICKS_BEFORE_REENTERING_HIVE = 400; private static final int MIN_OCCUPATION_TICKS_NECTAR = 2400; public static final int MIN_OCCUPATION_TICKS_NECTARLESS = 600; -@@ -152,11 +152,33 @@ public class BeehiveBlockEntity extends BlockEntity { +@@ -153,11 +_,33 @@ return list; } @@ -51,7 +43,7 @@ index f0673167d6273c7689cd58ac8f51e51649cb3ad0..67c094369c81080491ec8083c43bac2f // Paper start - Add EntityBlockStorage clearEntities public void clearBees() { this.stored.clear(); -@@ -397,8 +419,8 @@ public class BeehiveBlockEntity extends BlockEntity { +@@ -398,8 +_,8 @@ registrar.register(DebugSubscriptions.BEE_HIVES, () -> DebugHiveInfo.pack(this)); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch index a9b7b3429..d33824d55 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/entity/BlockEntity.java b/net/minecraft/world/level/block/entity/BlockEntity.java -index bd038bdaa00fb1e09b098b4d2809d17e2382288b..6b772326be591dafe1dc37fd81c41bcd6b0cca7d 100644 --- a/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -107,6 +107,10 @@ public abstract class BlockEntity implements DebugValueSource { +@@ -104,6 +_,10 @@ input.read("PublicBukkitValues", CompoundTag.CODEC) .ifPresent(this.persistentDataContainer::putAll); // Paper end - read persistent data container @@ -19,7 +11,7 @@ index bd038bdaa00fb1e09b098b4d2809d17e2382288b..6b772326be591dafe1dc37fd81c41bcd } public final void loadWithComponents(ValueInput input) { -@@ -119,6 +123,11 @@ public abstract class BlockEntity implements DebugValueSource { +@@ -116,6 +_,11 @@ } protected void saveAdditional(ValueOutput output) { @@ -31,7 +23,7 @@ index bd038bdaa00fb1e09b098b4d2809d17e2382288b..6b772326be591dafe1dc37fd81c41bcd } public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registries) { -@@ -408,4 +417,17 @@ public abstract class BlockEntity implements DebugValueSource { +@@ -400,4 +_,17 @@ return this.blockEntity.getNameForReporting() + "@" + this.blockEntity.getBlockPos(); } } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch similarity index 82% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch index 9b5f1fb41..0b72e4dbb 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/entity/ConduitBlockEntity.java b/net/minecraft/world/level/block/entity/ConduitBlockEntity.java -index d1f4a918b5fba7ad2d21fb4bec85746d6dbb69c3..ac8a959b54afd590f6c8c355c34c1b5ef0b0c45f 100644 --- a/net/minecraft/world/level/block/entity/ConduitBlockEntity.java +++ b/net/minecraft/world/level/block/entity/ConduitBlockEntity.java -@@ -151,7 +151,7 @@ public class ConduitBlockEntity extends BlockEntity { +@@ -150,7 +_,7 @@ BlockPos blockPos1 = pos.offset(i, i1, i2x); BlockState blockState = level.getBlockState(blockPos1); @@ -17,7 +9,7 @@ index d1f4a918b5fba7ad2d21fb4bec85746d6dbb69c3..ac8a959b54afd590f6c8c355c34c1b5e if (blockState.is(block)) { positions.add(blockPos1); } -@@ -166,13 +166,13 @@ public class ConduitBlockEntity extends BlockEntity { +@@ -165,13 +_,13 @@ private static void applyEffects(Level level, BlockPos pos, List positions) { // CraftBukkit start @@ -34,7 +26,7 @@ index d1f4a918b5fba7ad2d21fb4bec85746d6dbb69c3..ac8a959b54afd590f6c8c355c34c1b5e // CraftBukkit start return i; } -@@ -202,7 +202,7 @@ public class ConduitBlockEntity extends BlockEntity { +@@ -201,7 +_,7 @@ EntityReference entityReference = updateDestroyTarget(blockEntity.destroyTarget, level, pos, canDestroy); LivingEntity livingEntity = EntityReference.getLivingEntity(entityReference, level); if (damageTarget && livingEntity != null) { // CraftBukkit @@ -43,7 +35,7 @@ index d1f4a918b5fba7ad2d21fb4bec85746d6dbb69c3..ac8a959b54afd590f6c8c355c34c1b5e level.playSound( null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F ); -@@ -224,20 +224,26 @@ public class ConduitBlockEntity extends BlockEntity { +@@ -222,19 +_,25 @@ return selectNewTarget(level, pos); } else { LivingEntity livingEntity = EntityReference.getLivingEntity(destroyTarget, level); @@ -52,8 +44,7 @@ index d1f4a918b5fba7ad2d21fb4bec85746d6dbb69c3..ac8a959b54afd590f6c8c355c34c1b5e } } - @Nullable - private static EntityReference selectNewTarget(ServerLevel level, BlockPos pos) { + private static @Nullable EntityReference selectNewTarget(ServerLevel level, BlockPos pos) { List entitiesOfClass = level.getEntitiesOfClass( - LivingEntity.class, getDestroyRangeAABB(pos), livingEntity -> livingEntity instanceof Enemy && livingEntity.isInWaterOrRain() + LivingEntity.class, getDestroyRangeAABB(pos, level), livingEntity -> livingEntity instanceof Enemy && livingEntity.isInWaterOrRain() // Purpur - Conduit behavior configuration diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java.patch similarity index 71% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java.patch index e0a0838ff..175e17e0c 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java.patch @@ -1,22 +1,14 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java b/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java -index f14517e2af285c02d417ca1b1dcfc669c62c98bf..3d9620d345fe39d643021bcfa20410a397e4e206 100644 --- a/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java +++ b/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java -@@ -31,6 +31,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable +@@ -30,6 +_,7 @@ + public float tRot; private static final RandomSource RANDOM = RandomSource.create(); - @Nullable - private Component name; + private @Nullable Component name; + private int lapis = 0; // Purpur - Enchantment Table Persists Lapis public EnchantingTableBlockEntity(BlockPos pos, BlockState blockState) { super(BlockEntityType.ENCHANTING_TABLE, pos, blockState); -@@ -40,12 +41,14 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable +@@ -39,12 +_,14 @@ protected void saveAdditional(ValueOutput output) { super.saveAdditional(output); output.storeNullable("CustomName", ComponentSerialization.CODEC, this.name); @@ -31,7 +23,7 @@ index f14517e2af285c02d417ca1b1dcfc669c62c98bf..3d9620d345fe39d643021bcfa20410a3 } public static void bookAnimationTick(Level level, BlockPos pos, BlockState state, EnchantingTableBlockEntity enchantingTable) { -@@ -137,4 +140,22 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable +@@ -135,4 +_,22 @@ public void removeComponentsFromTag(ValueOutput output) { output.discard("CustomName"); } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch similarity index 85% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch index 8f82d3ea4..cbe62ca7b 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/entity/SignBlockEntity.java b/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 958fc0335b6fad657f71f0d6a42d6fd2c55ef48d..6c89943944d4774adad7e7a4e4357b102e34413c 100644 --- a/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -149,16 +149,32 @@ public class SignBlockEntity extends BlockEntity { +@@ -149,16 +_,32 @@ return this.setText(updater.apply(text), isFrontText); } @@ -43,10 +35,11 @@ index 958fc0335b6fad657f71f0d6a42d6fd2c55ef48d..6c89943944d4774adad7e7a4e4357b10 ); } } -@@ -308,6 +324,27 @@ public class SignBlockEntity extends BlockEntity { - return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, level, 2, string, component, level.getServer(), player); // Paper - Fix commands from signs not firing command events +@@ -308,6 +_,27 @@ + return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, level, LevelBasedPermissionSet.GAMEMASTER, string, component, level.getServer(), player + ); // Paper - Fix commands from signs not firing command events } - ++ + // Purpur start - Signs allow color codes + public ClientboundBlockEntityDataPacket getTranslatedUpdatePacket(boolean filtered, boolean front) { + try (net.minecraft.util.ProblemReporter.ScopedCollector scopedCollector = new net.minecraft.util.ProblemReporter.ScopedCollector(this.problemPath(), LOGGER)) { @@ -67,7 +60,6 @@ index 958fc0335b6fad657f71f0d6a42d6fd2c55ef48d..6c89943944d4774adad7e7a4e4357b10 + } + } + // Purpur end - Signs allow color codes -+ + @Override public ClientboundBlockEntityDataPacket getUpdatePacket() { - return ClientboundBlockEntityDataPacket.create(this); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/piston/PistonStructureResolver.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonStructureResolver.java.patch similarity index 65% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/piston/PistonStructureResolver.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonStructureResolver.java.patch index 1313cd339..bc6293606 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/piston/PistonStructureResolver.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonStructureResolver.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/piston/PistonStructureResolver.java b/net/minecraft/world/level/block/piston/PistonStructureResolver.java -index ad143a92569f5b420ccaa2089758b2fb3b4ab7c5..5a3660e02bc805e9a35a81b8a61f07b3f20b5ba9 100644 --- a/net/minecraft/world/level/block/piston/PistonStructureResolver.java +++ b/net/minecraft/world/level/block/piston/PistonStructureResolver.java -@@ -81,7 +81,7 @@ public class PistonStructureResolver { +@@ -81,7 +_,7 @@ return true; } else { int i = 1; @@ -17,7 +9,7 @@ index ad143a92569f5b420ccaa2089758b2fb3b4ab7c5..5a3660e02bc805e9a35a81b8a61f07b3 return false; } else { while (isSticky(blockState)) { -@@ -95,7 +95,7 @@ public class PistonStructureResolver { +@@ -95,7 +_,7 @@ break; } @@ -26,7 +18,7 @@ index ad143a92569f5b420ccaa2089758b2fb3b4ab7c5..5a3660e02bc805e9a35a81b8a61f07b3 return false; } } -@@ -140,7 +140,7 @@ public class PistonStructureResolver { +@@ -140,7 +_,7 @@ return true; } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/chunk/storage/EntityStorage.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/chunk/storage/EntityStorage.java.patch similarity index 56% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/chunk/storage/EntityStorage.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/chunk/storage/EntityStorage.java.patch index a0065e57e..accc2318d 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/chunk/storage/EntityStorage.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/chunk/storage/EntityStorage.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/chunk/storage/EntityStorage.java b/net/minecraft/world/level/chunk/storage/EntityStorage.java -index f1f8575a4b37114ced3cdb1d2ea33a36a2db44fd..2afe96a69c09decbe972332d2d38f67427d880d8 100644 --- a/net/minecraft/world/level/chunk/storage/EntityStorage.java +++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java -@@ -108,6 +108,7 @@ public class EntityStorage implements EntityPersistentStorage { +@@ -108,6 +_,7 @@ } // Paper end - Entity load/save limit per chunk TagValueOutput tagValueOutput = TagValueOutput.createWithContext(scopedCollector.forChild(entity.problemPath()), entity.registryAccess()); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch similarity index 68% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch index 9b60af8d8..a49716364 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index 8ea830f561f5b7d6ff6ca3c38adc7fe8e54e4cc7..0e6222214f4b5407705dcbdf4dcf574111bcf366 100644 --- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -309,7 +309,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -309,7 +_,7 @@ // Paper start private static void printOversizedLog(String msg, Path file, int x, int z) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch similarity index 63% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch index 4e65c4e4e..2962a6ce4 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/levelgen/DensityFunctions.java b/net/minecraft/world/level/levelgen/DensityFunctions.java -index 07900150a9ec31d0e7c286787c4f10cb4cde3001..236b017e18bba53c7df37415b7681e6e4ee7f20a 100644 --- a/net/minecraft/world/level/levelgen/DensityFunctions.java +++ b/net/minecraft/world/level/levelgen/DensityFunctions.java -@@ -534,7 +534,7 @@ public final class DensityFunctions { +@@ -534,7 +_,7 @@ int i1 = z / 2; int i2 = x % 2; int i3 = z % 2; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch similarity index 85% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch index 516b85cb1..5652d79c6 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/levelgen/PhantomSpawner.java b/net/minecraft/world/level/levelgen/PhantomSpawner.java -index 801a50ba4d202df0289339f26968e7f6bb9ca767..adb6354d6764aca56d82d8aa44383208df389e8c 100644 --- a/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/net/minecraft/world/level/levelgen/PhantomSpawner.java -@@ -38,13 +38,13 @@ public class PhantomSpawner implements CustomSpawner { +@@ -38,13 +_,13 @@ int spawnAttemptMaxSeconds = level.paperConfig().entities.behavior.phantomsSpawnAttemptMaxSeconds; this.nextTick += (spawnAttemptMinSeconds + randomSource.nextInt(spawnAttemptMaxSeconds - spawnAttemptMinSeconds + 1)) * 20; // Paper end - Ability to control player's insomnia and phantoms @@ -25,7 +17,7 @@ index 801a50ba4d202df0289339f26968e7f6bb9ca767..adb6354d6764aca56d82d8aa44383208 ServerStatsCounter stats = serverPlayer.getStats(); int i = Mth.clamp(stats.getValue(Stats.CUSTOM.get(Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE); int i1 = 24000; -@@ -56,7 +56,7 @@ public class PhantomSpawner implements CustomSpawner { +@@ -56,7 +_,7 @@ FluidState fluidState = level.getFluidState(blockPos1); if (NaturalSpawner.isValidEmptySpawnBlock(level, blockPos1, blockState, fluidState, EntityType.PHANTOM)) { SpawnGroupData spawnGroupData = null; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/FlowingFluid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch similarity index 62% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/FlowingFluid.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch index cc41ceb01..f174b46a5 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/FlowingFluid.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java -index 85e9ec8061fc01d39977f6db314da14b1e7725e1..9685d02a9837c773094a5da5cff6fa6fcfeed86a 100644 --- a/net/minecraft/world/level/material/FlowingFluid.java +++ b/net/minecraft/world/level/material/FlowingFluid.java -@@ -233,7 +233,7 @@ public abstract class FlowingFluid extends Fluid { +@@ -233,7 +_,7 @@ } } @@ -17,16 +9,16 @@ index 85e9ec8061fc01d39977f6db314da14b1e7725e1..9685d02a9837c773094a5da5cff6fa6f BlockState blockState1 = level.getBlockState(mutableBlockPos.setWithOffset(pos, Direction.DOWN)); FluidState fluidState1 = blockState1.getFluidState(); if (blockState1.isSolid() || this.isSourceBlockOfThisType(fluidState1)) { -@@ -321,6 +321,12 @@ public abstract class FlowingFluid extends Fluid { +@@ -320,6 +_,12 @@ + } protected abstract boolean canConvertToSource(ServerLevel level); - ++ + // Purpur start - Implement infinite liquids + protected int getRequiredSources(Level level) { + return 2; + } + // Purpur end - Implement infinite liquids -+ + protected void spreadTo(LevelAccessor level, BlockPos pos, BlockState state, Direction direction, FluidState fluidState) { if (state.getBlock() instanceof LiquidBlockContainer liquidBlockContainer) { - liquidBlockContainer.placeLiquid(level, pos, state, fluidState); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch new file mode 100644 index 000000000..25d7276d9 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch @@ -0,0 +1,25 @@ +--- a/net/minecraft/world/level/material/LavaFluid.java ++++ b/net/minecraft/world/level/material/LavaFluid.java +@@ -190,7 +_,7 @@ + + @Override + public int getTickDelay(LevelReader level) { +- return isFastLava(level) ? 10 : 30; ++ return isFastLava(level) ? level.getWorldBorder().world.purpurConfig.lavaSpeedNether : level.getWorldBorder().world.purpurConfig.lavaSpeedNotNether; // Purpur - Make lava flow speed configurable + } + + @Override +@@ -211,6 +_,13 @@ + private void fizz(LevelAccessor level, BlockPos pos) { + level.levelEvent(LevelEvent.LAVA_FIZZ, pos, 0); + } ++ ++ // Purpur start - Implement infinite liquids ++ @Override ++ protected int getRequiredSources(Level level) { ++ return level.purpurConfig.lavaInfiniteRequiredSources; ++ } ++ // Purpur end - Implement infinite liquids + + @Override + protected boolean canConvertToSource(ServerLevel level) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/WaterFluid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/WaterFluid.java.patch new file mode 100644 index 000000000..0a3d7b259 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/WaterFluid.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/world/level/material/WaterFluid.java ++++ b/net/minecraft/world/level/material/WaterFluid.java +@@ -77,6 +_,13 @@ + return level.getGameRules().get(GameRules.WATER_SOURCE_CONVERSION); + } + ++ // Purpur start - Implement infinite liquids ++ @Override ++ protected int getRequiredSources(Level level) { ++ return level.purpurConfig.waterInfiniteRequiredSources; ++ } ++ // Purpur end - Implement infinite liquids ++ + // Paper start - Add BlockBreakBlockEvent + @Override + protected void beforeDestroyingBlock(LevelAccessor level, BlockPos pos, BlockState state, BlockPos source) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch similarity index 70% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch index 91f645742..0988ceb36 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -index 9e6b2bbc1f83d32d0332f036be4f1a0e18b826bf..db6baaa698fe93aba3fbd595158b568badd6cb8a 100644 --- a/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -@@ -240,7 +240,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -239,7 +_,7 @@ if ((node == null || node.costMalus < 0.0F) && verticalDeltaLimit > 0 && (cachedPathType != PathType.FENCE || this.canWalkOverFences()) @@ -17,7 +9,7 @@ index 9e6b2bbc1f83d32d0332f036be4f1a0e18b826bf..db6baaa698fe93aba3fbd595158b568b && cachedPathType != PathType.TRAPDOOR && cachedPathType != PathType.POWDER_SNOW) { node = this.tryJumpOn(x, y, z, verticalDeltaLimit, nodeFloorLevel, direction, pathType, mutableBlockPos); -@@ -493,7 +493,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -490,7 +_,7 @@ return PathType.TRAPDOOR; } else if (blockState.is(Blocks.POWDER_SNOW)) { return PathType.POWDER_SNOW; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/portal/PortalShape.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch similarity index 64% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/portal/PortalShape.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch index aed897c35..bb195b4da 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/portal/PortalShape.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/portal/PortalShape.java b/net/minecraft/world/level/portal/PortalShape.java -index f6f171e81a805f39359213626a9d5d6a5cb9639c..6b0c931d2651e945ed70dd9169fc89bc25da4566 100644 --- a/net/minecraft/world/level/portal/PortalShape.java +++ b/net/minecraft/world/level/portal/PortalShape.java -@@ -29,7 +29,7 @@ public class PortalShape { +@@ -29,7 +_,7 @@ public static final int MAX_WIDTH = 21; private static final int MIN_HEIGHT = 3; public static final int MAX_HEIGHT = 21; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch similarity index 50% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch index 61664b065..138758dfe 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index 8ae116c71c4a7d45ae5558926bb44092e353f2a1..d96b02b173c7a9bfcb778066a53572088967dcaa 100644 --- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -@@ -81,6 +81,7 @@ public class MapItemSavedData extends SavedData { +@@ -81,6 +_,7 @@ public final Map decorations = Maps.newLinkedHashMap(); private final Map frameMarkers = Maps.newHashMap(); private int trackedDecorationCount; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch similarity index 64% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch index 43ad2ec43..bc7b09181 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java b/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java -index c4f29da30d63deb3f9eabafcf62a946ff148b6b7..f3083702286dfb7932f08e0b811eded7988cbab4 100644 --- a/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java +++ b/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java -@@ -66,6 +66,11 @@ public class EnchantedCountIncreaseFunction extends LootItemConditionalFunction +@@ -66,6 +_,11 @@ Entity entity = context.getOptionalParameter(LootContextParams.ATTACKING_ENTITY); if (entity instanceof LivingEntity livingEntity) { int enchantmentLevel = EnchantmentHelper.getEnchantmentLevel(this.enchantment, livingEntity); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/phys/AABB.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/phys/AABB.java.patch similarity index 54% rename from purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/phys/AABB.java.patch rename to purpur-server/minecraft-patches/sources/net/minecraft/world/phys/AABB.java.patch index e18be7ed1..c9a65ab94 100644 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/phys/AABB.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/phys/AABB.java.patch @@ -1,14 +1,6 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/phys/AABB.java b/net/minecraft/world/phys/AABB.java -index cffb3b7d480f72cdb9ed535f362fa60f30597523..529bd339441fde279ed81573ca5339a0837b3b87 100644 --- a/net/minecraft/world/phys/AABB.java +++ b/net/minecraft/world/phys/AABB.java -@@ -476,4 +476,10 @@ public class AABB { +@@ -475,4 +_,10 @@ return new AABB(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ); } } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/gametest/framework/GameTestHelper.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/gametest/framework/GameTestHelper.java.patch deleted file mode 100644 index 1b91ba39f..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/gametest/framework/GameTestHelper.java.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/gametest/framework/GameTestHelper.java b/net/minecraft/gametest/framework/GameTestHelper.java -index be306c0b3346d1226e2c6d70ebfd83120f4bc124..6c452f195055afb489f828bfac9f23217ba7653d 100644 ---- a/net/minecraft/gametest/framework/GameTestHelper.java -+++ b/net/minecraft/gametest/framework/GameTestHelper.java -@@ -312,6 +312,8 @@ public class GameTestHelper { - return gameType; - } - -+ public void setAfk(final boolean afk) {} // Purpur - AFK API -+ - @Override - public boolean isClientAuthoritative() { - return false; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/GlowSquid.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/GlowSquid.java.patch deleted file mode 100644 index 3ec4fdadb..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/GlowSquid.java.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/GlowSquid.java b/net/minecraft/world/entity/GlowSquid.java -index ae11fa15dc14f2b828cde4e3abfac330828c597e..70790f4e813bb950e103314644bd1d767edb4123 100644 ---- a/net/minecraft/world/entity/GlowSquid.java -+++ b/net/minecraft/world/entity/GlowSquid.java -@@ -27,6 +27,13 @@ public class GlowSquid extends Squid { - super(type, level); - } - -+ // Purpur start - Flying squids! Oh my! -+ @Override -+ public boolean canFly() { -+ return this.level().purpurConfig.glowSquidsCanFly; -+ } -+ // Purpur end - Flying squids! Oh my! -+ - @Override - protected ParticleOptions getInkParticle() { - return ParticleTypes.GLOW_SQUID_INK; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/attributes/RangedAttribute.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/attributes/RangedAttribute.java.patch deleted file mode 100644 index 3627cbcbb..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ai/attributes/RangedAttribute.java.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java -index 0a0e5d9fd64182c1bed4c0aa6a40d8b2cdf8bc9d..353d571b4a2bf18414a08239abe2b079e3750d89 100644 ---- a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java -+++ b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java -@@ -29,6 +29,7 @@ public class RangedAttribute extends Attribute { - - @Override - public double sanitizeValue(double value) { -+ if (!org.purpurmc.purpur.PurpurConfig.clampAttributes) return Double.isNaN(value) ? this.minValue : value; // Purpur - Add attribute clamping and armor limit config - return Double.isNaN(value) ? this.minValue : Mth.clamp(value, this.minValue, this.maxValue); - } - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ambient/Bat.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ambient/Bat.java.patch deleted file mode 100644 index c0d5bf84f..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/ambient/Bat.java.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java -index c0198c0b6d00667c9591a5cd254b0bfedc3fb627..acb402027bbb16a1b590415b2358cf03147119c0 100644 ---- a/net/minecraft/world/entity/ambient/Bat.java -+++ b/net/minecraft/world/entity/ambient/Bat.java -@@ -234,7 +234,7 @@ public class Bat extends AmbientCreature { - } else { - int maxLocalRawBrightness = level.getMaxLocalRawBrightness(pos); - int i = 4; -- if (isHalloween()) { -+ if (Bat.isHalloweenSeason(level.getMinecraftWorld())) { // Purpur - Halloween options and optimizations - i = 7; - } else if (randomSource.nextBoolean()) { - return false; -@@ -246,6 +246,7 @@ public class Bat extends AmbientCreature { - } - } - -+ public static boolean isHalloweenSeason(Level level) { return level.purpurConfig.forceHalloweenSeason || isHalloween(); } // Purpur - Halloween options and optimizations - private static boolean isHalloween() { - LocalDate localDate = LocalDate.now(); - int i = localDate.get(ChronoField.DAY_OF_MONTH); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Ocelot.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Ocelot.java.patch deleted file mode 100644 index 6cbd963e0..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/animal/Ocelot.java.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/animal/Ocelot.java b/net/minecraft/world/entity/animal/Ocelot.java -index 4c4760a5b3242a83e88cedb192b1309e5fb29ee2..ae93426d4bd7f82c3beb90b2c7a957ccbf24ddd7 100644 ---- a/net/minecraft/world/entity/animal/Ocelot.java -+++ b/net/minecraft/world/entity/animal/Ocelot.java -@@ -235,7 +235,7 @@ public class Ocelot extends Animal { - public boolean checkSpawnObstruction(LevelReader level) { - if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) { - BlockPos blockPos = this.blockPosition(); -- if (blockPos.getY() < level.getSeaLevel()) { -+ if (!level().purpurConfig.ocelotSpawnUnderSeaLevel && blockPos.getY() < level.getSeaLevel()) { // Purpur - Option Ocelot Spawn Under Sea Level - return false; - } - diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch deleted file mode 100644 index 180299832..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/AbstractSkeleton.java b/net/minecraft/world/entity/monster/AbstractSkeleton.java -index e52106704041d6bbc1670f425c3879e945d27a5f..3d2fcdc99cea6981c8d516853ba28f51bd114dbd 100644 ---- a/net/minecraft/world/entity/monster/AbstractSkeleton.java -+++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java -@@ -158,10 +158,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo - this.reassessWeaponGoal(); - this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || random.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot - if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { -- LocalDate localDate = LocalDate.now(); -- int i = localDate.get(ChronoField.DAY_OF_MONTH); -- int i1 = localDate.get(ChronoField.MONTH_OF_YEAR); -- if (i1 == 10 && i == 31 && random.nextFloat() < 0.25F) { -+ if (net.minecraft.world.entity.ambient.Bat.isHalloweenSeason(level.getMinecraftWorld()) && this.random.nextFloat() < this.level().purpurConfig.chanceHeadHalloweenOnEntity) { // Purpur - Halloween options and optimizations - this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); - this.setDropChance(EquipmentSlot.HEAD, 0.0F); - } -@@ -209,7 +206,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo - double squareRoot = Math.sqrt(d * d + d2 * d2); - if (this.level() instanceof ServerLevel serverLevel) { - Projectile.Delayed delayedEntity = Projectile.spawnProjectileUsingShootDelayed( // Paper - delayed -- arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, 14 - serverLevel.getDifficulty().getId() * 4 -+ arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, serverLevel.purpurConfig.skeletonBowAccuracyMap.getOrDefault(serverLevel.getDifficulty().getId(), (float) (14 - serverLevel.getDifficulty().getId() * 4)) // Purpur - skeleton bow accuracy option - ); - - // Paper start - call EntityShootBowEvent diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Vindicator.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Vindicator.java.patch deleted file mode 100644 index 94e72a55f..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/monster/Vindicator.java.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/monster/Vindicator.java b/net/minecraft/world/entity/monster/Vindicator.java -index 714ebce87550e3d36cb269fcb5653975113671db..29482ed26387e5d6f04d59deda5990d24b7a07a9 100644 ---- a/net/minecraft/world/entity/monster/Vindicator.java -+++ b/net/minecraft/world/entity/monster/Vindicator.java -@@ -131,6 +131,11 @@ public class Vindicator extends AbstractIllager { - RandomSource random = level.getRandom(); - this.populateDefaultEquipmentSlots(random, difficulty); - this.populateDefaultEquipmentEnchantments(level, random, difficulty); -+ // Purpur start - Special mobs naturally spawn -+ if (level().purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= level().purpurConfig.vindicatorJohnnySpawnChance) { -+ setCustomName(Component.translatable("Johnny")); -+ } -+ // Purpur end - Special mobs naturally spawn - return spawnGroupData1; - } - diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/raid/Raids.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/raid/Raids.java.patch deleted file mode 100644 index 1a5ed004c..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/raid/Raids.java.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/raid/Raids.java b/net/minecraft/world/entity/raid/Raids.java -index 870479811375677c1c1b7faae0c2d9fdef89cb72..cdc862e3721f4ef05be302cb0a1e0f8965ddbb1b 100644 ---- a/net/minecraft/world/entity/raid/Raids.java -+++ b/net/minecraft/world/entity/raid/Raids.java -@@ -30,6 +30,7 @@ import net.minecraft.world.phys.Vec3; - - public class Raids extends SavedData { - private static final String RAID_FILE_ID = "raids"; -+ public final java.util.Map playerCooldowns = com.google.common.collect.Maps.newHashMap(); // Purpur - Raid cooldown setting - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - Raids.RaidWithId.CODEC -@@ -82,6 +83,17 @@ public class Raids extends SavedData { - - public void tick(ServerLevel level) { - this.tick++; -+ // Purpur start - Raid cooldown setting -+ if (level.purpurConfig.raidCooldownSeconds != 0 && this.tick % 20 == 0) { -+ com.google.common.collect.ImmutableMap.copyOf(playerCooldowns).forEach((uuid, i) -> { -+ if (i < 1) { -+ playerCooldowns.remove(uuid); -+ } else { -+ playerCooldowns.put(uuid, i - 1); -+ } -+ }); -+ } -+ // Purpur end - Raid cooldown setting - Iterator iterator = this.raidMap.values().iterator(); - - while (iterator.hasNext()) { -@@ -147,11 +159,13 @@ public class Raids extends SavedData { - // } - - 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 -+ if (serverLevel.purpurConfig.raidCooldownSeconds != 0 && playerCooldowns.containsKey(player.getUUID())) return null; // Purpur - Raid cooldown setting - // CraftBukkit start - if (!org.bukkit.craftbukkit.event.CraftEventFactory.callRaidTriggerEvent(serverLevel, raid, player)) { - player.removeEffect(net.minecraft.world.effect.MobEffects.RAID_OMEN); - return null; - } -+ if (serverLevel.purpurConfig.raidCooldownSeconds != 0) playerCooldowns.put(player.getUUID(), serverLevel.purpurConfig.raidCooldownSeconds); // Purpur - Raid cooldown setting - - if (!raid.isStarted() && !this.raidMap.containsValue(raid)) { - this.raidMap.put(this.getUniqueId(), raid); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch deleted file mode 100644 index 4faedfada..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java -index adab5dc640a7a0299c04020225a68317282aebe9..2e8b923a97ed33ecc2802a0ac452e86e9f397bda 100644 ---- a/net/minecraft/world/entity/vehicle/AbstractBoat.java -+++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java -@@ -432,6 +432,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - float groundFriction = this.getGroundFriction(); - if (groundFriction > 0.0F) { - this.landFriction = groundFriction; -+ if (level().purpurConfig.boatEjectPlayersOnLand) ejectPassengers(); // Purpur - Add option for boats to eject players on land - return AbstractBoat.Status.ON_LAND; - } else { - return AbstractBoat.Status.IN_AIR; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch deleted file mode 100644 index 8de8a004c..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java -index 670090c4466d6472a83263e1769f19e3e491c927..276b5e6ac82e6e55e0a19c25a7c966501aeaba44 100644 ---- a/net/minecraft/world/inventory/AbstractContainerMenu.java -+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java -@@ -65,6 +65,7 @@ public abstract class AbstractContainerMenu { - @Nullable - private ContainerSynchronizer synchronizer; - private boolean suppressRemoteUpdates; -+ @Nullable protected ItemStack activeQuickItem = null; // Purpur - Anvil API - // CraftBukkit start - public boolean checkReachable = true; - public abstract org.bukkit.inventory.InventoryView getBukkitView(); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch deleted file mode 100644 index 3c6de9025..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/inventory/ItemCombinerMenu.java b/net/minecraft/world/inventory/ItemCombinerMenu.java -index 2cc21a907aa4acba408478842bcbdefb3dd4dffc..08d5f00712810a16a49aaa0fffec1fdf524b1b95 100644 ---- a/net/minecraft/world/inventory/ItemCombinerMenu.java -+++ b/net/minecraft/world/inventory/ItemCombinerMenu.java -@@ -155,7 +155,9 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { - return ItemStack.EMPTY; - } - -+ this.activeQuickItem = itemStack; // Purpur - Anvil API - slot.onTake(player, item); -+ this.activeQuickItem = null; // Purpur - Anvil API - } - - return itemStack; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BucketItem.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BucketItem.java.patch deleted file mode 100644 index 768c88cd8..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/BucketItem.java.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/BucketItem.java b/net/minecraft/world/item/BucketItem.java -index d27e680993fb3ae18a0bdf09ec7b176551bb015b..1534b142bf8188df0ef6652e39768e0a0c88bcf2 100644 ---- a/net/minecraft/world/item/BucketItem.java -+++ b/net/minecraft/world/item/BucketItem.java -@@ -147,7 +147,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { - // CraftBukkit end - if (!flag2) { - return hitResult != null && this.emptyContents(entity, level, hitResult.getBlockPos().relative(hitResult.getDirection()), null, direction, clicked, itemstack, hand); // CraftBukkit -- } else if (level.dimensionType().ultraWarm() && this.content.is(FluidTags.WATER)) { -+ } else if ((level.dimensionType().ultraWarm() || (level.isTheEnd() && !org.purpurmc.purpur.PurpurConfig.allowWaterPlacementInTheEnd)) && this.content == Fluids.WATER) { // Purpur - Add allow water in end world option - int x = pos.getX(); - int y = pos.getY(); - int z = pos.getZ(); -@@ -156,7 +156,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { - ); - - for (int i = 0; i < 8; i++) { -- level.addParticle(ParticleTypes.LARGE_SMOKE, x + Math.random(), y + Math.random(), z + Math.random(), 0.0, 0.0, 0.0); -+ ((net.minecraft.server.level.ServerLevel) level).sendParticlesSource(null, ParticleTypes.LARGE_SMOKE, true, false, x + Math.random(), y + Math.random(), z + Math.random(), 1, 0.0D, 0.0D, 0.0D, 0.0D); // Purpur - Add allow water in end world option - } - - return true; diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch deleted file mode 100644 index 586d94e9c..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/ProjectileWeaponItem.java b/net/minecraft/world/item/ProjectileWeaponItem.java -index 663826d7e26bf647376eacbf0c6a2bb80bbdf55a..aa1cf1653d33cd35f77db28dbee0c2319e1975f3 100644 ---- a/net/minecraft/world/item/ProjectileWeaponItem.java -+++ b/net/minecraft/world/item/ProjectileWeaponItem.java -@@ -106,6 +106,8 @@ public abstract class ProjectileWeaponItem extends Item { - abstractArrow.setCritArrow(true); - } - -+ abstractArrow.setActualEnchantments(weapon.getEnchantments()); // Purpur - Add an option to fix MC-3304 projectile looting -+ - return abstractArrow; - } - diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/crafting/Ingredient.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/crafting/Ingredient.java.patch deleted file mode 100644 index 5130916b1..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/item/crafting/Ingredient.java.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/item/crafting/Ingredient.java b/net/minecraft/world/item/crafting/Ingredient.java -index 879c8fe1f20decc793cfa39e686b61d521bd76ba..9c383a1028988cdd3de8b29ba72a4d7bd2a37c7e 100644 ---- a/net/minecraft/world/item/crafting/Ingredient.java -+++ b/net/minecraft/world/item/crafting/Ingredient.java -@@ -36,6 +36,7 @@ public final class Ingredient implements StackedContents.IngredientInfo itemStacks; // Paper - Improve exact choice recipe ingredients -+ public Predicate predicate; // Purpur - Add predicate to recipe's ExactChoice ingredient - - public boolean isExact() { - return this.itemStacks != null; -@@ -88,6 +89,11 @@ public final class Ingredient implements StackedContents.IngredientInfo -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java b/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java -index fb6e9194440b85487660f91aea7e34fdf086187b..2653ae5bf66f2b117f86e4df04d9cc307ba09011 100644 ---- a/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java -+++ b/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java -@@ -39,6 +39,7 @@ public abstract class BaseCoralPlantTypeBlock extends Block implements SimpleWat - } - - protected static boolean scanForWater(BlockState state, BlockGetter level, BlockPos pos) { -+ if (!((net.minecraft.world.level.LevelAccessor) level).getMinecraftWorld().purpurConfig.coralDieOutsideWater) return true; // Purpur - Config to not let coral die - if (state.getValue(WATERLOGGED)) { - return true; - } else { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch deleted file mode 100644 index ee493d9b8..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/BigDripleafBlock.java b/net/minecraft/world/level/block/BigDripleafBlock.java -index b0b18ec7038509cca2d4647cf277ea544eb45f35..24599a3ef75fda6feb94de8e895920f1eab1d08e 100644 ---- a/net/minecraft/world/level/block/BigDripleafBlock.java -+++ b/net/minecraft/world/level/block/BigDripleafBlock.java -@@ -254,7 +254,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone - playTiltSound(level, pos, sound); - } - -- int _int = DELAY_UNTIL_NEXT_TILT_STATE.getInt(tilt); -+ int _int = level.purpurConfig.bigDripleafTiltDelay.getOrDefault(tilt, -1); // Purpur - Big dripleaf tilt delay - if (_int != -1) { - level.scheduleTick(pos, this, _int); - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/DragonEggBlock.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/DragonEggBlock.java.patch deleted file mode 100644 index a3be3a87e..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/DragonEggBlock.java.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/DragonEggBlock.java b/net/minecraft/world/level/block/DragonEggBlock.java -index 52160294e39e3f0f471087a1fcb6e46763862954..c38fbff78f1acef9328c91d7b88d5db1971c9474 100644 ---- a/net/minecraft/world/level/block/DragonEggBlock.java -+++ b/net/minecraft/world/level/block/DragonEggBlock.java -@@ -46,6 +46,7 @@ public class DragonEggBlock extends FallingBlock { - } - - private void teleport(BlockState state, Level level, BlockPos pos) { -+ if (!level.purpurConfig.dragonEggTeleport) return; // Purpur - Option to disable dragon egg teleporting - WorldBorder worldBorder = level.getWorldBorder(); - - for (int i = 0; i < 1000; i++) { diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/HayBlock.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/HayBlock.java.patch deleted file mode 100644 index 20d28ac8b..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/HayBlock.java.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/HayBlock.java b/net/minecraft/world/level/block/HayBlock.java -index cdde0a25e0a499d7575c00796143a033feb1f22f..999ecf16180b0a862cf8527ce532acf725ba869a 100644 ---- a/net/minecraft/world/level/block/HayBlock.java -+++ b/net/minecraft/world/level/block/HayBlock.java -@@ -23,6 +23,6 @@ public class HayBlock extends RotatedPillarBlock { - - @Override - public void fallOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance) { -- entity.causeFallDamage(fallDistance, 0.2F, level.damageSources().fall()); -+ super.fallOn(level, state, pos, entity, fallDistance); // Purpur - Configurable block fall damage modifiers - } - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/IceBlock.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/IceBlock.java.patch deleted file mode 100644 index 9e2746cd2..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/IceBlock.java.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/IceBlock.java b/net/minecraft/world/level/block/IceBlock.java -index f3b649b9c4d949910c38bc59a3d4316fb73a481b..080c1f7a3e54481cad4ff0bd71cae2cb54e5e260 100644 ---- a/net/minecraft/world/level/block/IceBlock.java -+++ b/net/minecraft/world/level/block/IceBlock.java -@@ -40,7 +40,7 @@ public class IceBlock extends HalfTransparentBlock { - public void afterDestroy(Level level, BlockPos pos, ItemStack stack) { - // Paper end - Improve Block#breakNaturally API - if (!EnchantmentHelper.hasTag(stack, EnchantmentTags.PREVENTS_ICE_MELTING)) { -- if (level.dimensionType().ultraWarm()) { -+ if (level.isNether() || (level.isTheEnd() && !org.purpurmc.purpur.PurpurConfig.allowWaterPlacementInTheEnd)) { // Purpur - Add allow water in end world option - level.removeBlock(pos, false); - return; - } -@@ -65,7 +65,7 @@ public class IceBlock extends HalfTransparentBlock { - return; - } - // CraftBukkit end -- if (level.dimensionType().ultraWarm()) { -+ if (level.isNether() || (level.isTheEnd() && !org.purpurmc.purpur.PurpurConfig.allowWaterPlacementInTheEnd)) { // Purpur - Add allow water in end world option - level.removeBlock(pos, false); - } else { - level.setBlockAndUpdate(pos, meltsInto()); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/KelpBlock.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/KelpBlock.java.patch deleted file mode 100644 index dfb45d613..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/block/KelpBlock.java.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/block/KelpBlock.java b/net/minecraft/world/level/block/KelpBlock.java -index 8e3f2518e705a4b8988a1c9da730f0c89f21bdce..6e6212fd891dcaea0d0a398a73416f31d2cb2406 100644 ---- a/net/minecraft/world/level/block/KelpBlock.java -+++ b/net/minecraft/world/level/block/KelpBlock.java -@@ -72,4 +72,11 @@ public class KelpBlock extends GrowingPlantHeadBlock implements LiquidBlockConta - protected FluidState getFluidState(BlockState state) { - return Fluids.WATER.getSource(false); - } -+ -+ // Purpur start - kelp vines configurable max growth age -+ @Override -+ public int getMaxGrowthAge() { -+ return org.purpurmc.purpur.PurpurConfig.kelpMaxGrowthAge; -+ } -+ // Purpur end - kelp vines configurable max growth age - } diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/LavaFluid.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/LavaFluid.java.patch deleted file mode 100644 index d89773878..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/LavaFluid.java.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/material/LavaFluid.java b/net/minecraft/world/level/material/LavaFluid.java -index 6f9e277f8ec94169e2ff8b70b63d5ef52729b069..4df0dad91a5beeb0443ac1849e7783c470aae3d3 100644 ---- a/net/minecraft/world/level/material/LavaFluid.java -+++ b/net/minecraft/world/level/material/LavaFluid.java -@@ -192,7 +192,7 @@ public abstract class LavaFluid extends FlowingFluid { - - @Override - public int getTickDelay(LevelReader level) { -- return level.dimensionType().ultraWarm() ? 10 : 30; -+ return level.dimensionType().ultraWarm() ? level.getWorldBorder().world.purpurConfig.lavaSpeedNether : level.getWorldBorder().world.purpurConfig.lavaSpeedNotNether; // Purpur - Make lava flow speed configurable - } - - @Override -@@ -214,6 +214,13 @@ public abstract class LavaFluid extends FlowingFluid { - level.levelEvent(LevelEvent.LAVA_FIZZ, pos, 0); - } - -+ // Purpur start - Implement infinite liquids -+ @Override -+ protected int getRequiredSources(Level level) { -+ return level.purpurConfig.lavaInfiniteRequiredSources; -+ } -+ // Purpur end - Implement infinite liquids -+ - @Override - protected boolean canConvertToSource(ServerLevel level) { - return level.getGameRules().getBoolean(GameRules.RULE_LAVA_SOURCE_CONVERSION); diff --git a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/WaterFluid.java.patch b/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/WaterFluid.java.patch deleted file mode 100644 index 8eedbbdb1..000000000 --- a/purpur-server/minecraft-patches/unapplied-sources/net/minecraft/world/level/material/WaterFluid.java.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 05:37:42 -0800 -Subject: [PATCH] purpur File Patches - - -diff --git a/net/minecraft/world/level/material/WaterFluid.java b/net/minecraft/world/level/material/WaterFluid.java -index b00dae925acf05d11566af2d9e098c393f525fdb..19505eafb8b3aa09d7f889ecb62bcc28d835b4c8 100644 ---- a/net/minecraft/world/level/material/WaterFluid.java -+++ b/net/minecraft/world/level/material/WaterFluid.java -@@ -78,6 +78,13 @@ public abstract class WaterFluid extends FlowingFluid { - return level.getGameRules().getBoolean(GameRules.RULE_WATER_SOURCE_CONVERSION); - } - -+ // Purpur start - Implement infinite liquids -+ @Override -+ protected int getRequiredSources(Level level) { -+ return level.purpurConfig.waterInfiniteRequiredSources; -+ } -+ // Purpur end - Implement infinite liquids -+ - // Paper start - Add BlockBreakBlockEvent - @Override - protected void beforeDestroyingBlock(LevelAccessor level, BlockPos pos, BlockState state, BlockPos source) {