From 59d7a40b38d27de82bf4160f48ba7c7562360334 Mon Sep 17 00:00:00 2001 From: granny Date: Wed, 28 May 2025 19:23:02 -0700 Subject: [PATCH] convert file patches to git patches --- purpur-server/build.gradle.kts.patch | 58 +++++++++++++++++++ .../activation/ActivationRange.java.patch | 12 +++- .../net/minecraft/CrashReport.java.patch | 14 ++++- .../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 | 10 +++- .../minecraft/network/Connection.java.patch | 10 +++- .../chat/SignedMessageChain.java.patch | 10 +++- .../net/minecraft/server/Main.java.patch | 10 +++- .../server/MinecraftServer.java.patch | 30 ++++++---- .../server/PlayerAdvancements.java.patch | 12 +++- .../server/commands/EnchantCommand.java.patch | 12 +++- .../commands/GameModeCommand.java.patch | 10 +++- .../server/commands/GiveCommand.java.patch | 10 +++- .../dedicated/DedicatedServer.java.patch | 16 +++-- .../DedicatedServerProperties.java.patch | 10 +++- .../server/gui/MinecraftServerGui.java.patch | 31 ++++++---- .../server/gui/StatsComponent.java.patch | 10 +++- .../server/level/ServerLevel.java.patch | 37 +++++++----- .../server/level/ServerPlayer.java.patch | 42 ++++++++------ .../level/ServerPlayerGameMode.java.patch | 16 +++-- .../server/level/WorldGenRegion.java.patch | 10 +++- .../ServerCommonPacketListenerImpl.java.patch | 18 ++++-- .../ServerGamePacketListenerImpl.java.patch | 38 +++++++----- .../ServerLoginPacketListenerImpl.java.patch | 10 +++- .../ServerStatusPacketListenerImpl.java.patch | 10 +++- .../server/players/PlayerList.java.patch | 18 ++++-- .../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 | 21 +++++-- .../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 | 40 ++++++++----- .../world/entity/EntitySelector.java.patch | 10 +++- .../world/entity/EntityType.java.patch | 14 ++++- .../world/entity/ExperienceOrb.java.patch | 12 +++- .../world/entity/GlowSquid.java.patch | 10 +++- .../world/entity/LivingEntity.java.patch | 47 ++++++++------- .../net/minecraft/world/entity/Mob.java.patch | 30 ++++++---- .../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 +++- .../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/ambient/Bat.java.patch | 12 +++- .../entity/animal/AbstractCow.java.patch | 14 ++++- .../world/entity/animal/Animal.java.patch | 12 +++- .../world/entity/animal/Bee.java.patch | 22 ++++--- .../world/entity/animal/Cat.java.patch | 12 +++- .../world/entity/animal/Dolphin.java.patch | 16 +++-- .../world/entity/animal/Fox.java.patch | 20 +++++-- .../world/entity/animal/IronGolem.java.patch | 16 +++-- .../entity/animal/MushroomCow.java.patch | 10 +++- .../world/entity/animal/Ocelot.java.patch | 10 +++- .../world/entity/animal/Parrot.java.patch | 18 ++++-- .../world/entity/animal/Pig.java.patch | 10 +++- .../world/entity/animal/PolarBear.java.patch | 14 ++++- .../world/entity/animal/Rabbit.java.patch | 10 +++- .../world/entity/animal/SnowGolem.java.patch | 14 ++++- .../world/entity/animal/Squid.java.patch | 14 ++++- .../entity/animal/WaterAnimal.java.patch | 10 +++- .../world/entity/animal/goat/Goat.java.patch | 10 +++- .../entity/animal/horse/Llama.java.patch | 18 ++++-- .../world/entity/animal/wolf/Wolf.java.patch | 24 +++++--- .../boss/enderdragon/EndCrystal.java.patch | 14 ++++- .../boss/enderdragon/EnderDragon.java.patch | 12 +++- .../entity/boss/wither/WitherBoss.java.patch | 22 ++++--- .../entity/decoration/ArmorStand.java.patch | 14 ++++- .../world/entity/item/ItemEntity.java.patch | 14 ++++- .../world/entity/item/PrimedTnt.java.patch | 10 +++- .../monster/AbstractSkeleton.java.patch | 12 +++- .../world/entity/monster/Creeper.java.patch | 16 +++-- .../world/entity/monster/Drowned.java.patch | 10 +++- .../world/entity/monster/EnderMan.java.patch | 22 ++++--- .../world/entity/monster/Endermite.java.patch | 12 +++- .../world/entity/monster/Monster.java.patch | 10 +++- .../world/entity/monster/Phantom.java.patch | 10 +++- .../world/entity/monster/Ravager.java.patch | 12 +++- .../world/entity/monster/Shulker.java.patch | 16 +++-- .../world/entity/monster/Skeleton.java.patch | 10 +++- .../world/entity/monster/Strider.java.patch | 10 +++- .../entity/monster/Vindicator.java.patch | 10 +++- .../world/entity/monster/Zombie.java.patch | 12 +++- .../entity/monster/ZombieVillager.java.patch | 10 +++- .../entity/monster/ZombifiedPiglin.java.patch | 18 ++++-- .../entity/monster/piglin/PiglinAi.java.patch | 17 ++++-- .../world/entity/npc/CatSpawner.java.patch | 14 ++++- .../world/entity/npc/Villager.java.patch | 24 +++++--- .../entity/npc/WanderingTrader.java.patch | 14 ++++- .../npc/WanderingTraderSpawner.java.patch | 10 +++- .../world/entity/player/Player.java.patch | 28 +++++---- .../projectile/AbstractArrow.java.patch | 20 +++++-- .../entity/projectile/Snowball.java.patch | 15 ++++- .../projectile/ThrownEnderpearl.java.patch | 12 +++- .../projectile/ThrownTrident.java.patch | 10 +++- .../entity/projectile/WitherSkull.java.patch | 18 ++++-- .../world/entity/raid/Raids.java.patch | 14 ++++- .../entity/vehicle/AbstractBoat.java.patch | 10 +++- .../vehicle/NewMinecartBehavior.java.patch | 10 +++- .../vehicle/OldMinecartBehavior.java.patch | 10 +++- .../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 | 26 ++++++--- .../world/inventory/ArmorSlot.java.patch | 10 +++- .../inventory/EnchantmentMenu.java.patch | 14 ++++- .../world/inventory/GrindstoneMenu.java.patch | 18 ++++-- .../inventory/ItemCombinerMenu.java.patch | 10 +++- .../minecraft/world/item/AxeItem.java.patch | 14 ++++- .../minecraft/world/item/BlockItem.java.patch | 14 ++++- .../minecraft/world/item/BowItem.java.patch | 14 ++++- .../world/item/BucketItem.java.patch | 12 +++- .../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 | 10 +++- .../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 | 12 +++- .../enchantment/EnchantmentHelper.java.patch | 10 +++- .../enchantment/ItemEnchantments.java.patch | 14 ++++- .../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 | 12 +++- .../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 | 14 ++++- .../level/block/BigDripleafBlock.java.patch | 10 +++- .../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 | 12 +++- .../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 | 12 +++- .../world/level/block/DoorBlock.java.patch | 12 +++- .../level/block/DragonEggBlock.java.patch | 10 +++- .../block/EnchantingTableBlock.java.patch | 10 +++- .../world/level/block/FarmBlock.java.patch | 14 ++++- .../block/GrowingPlantHeadBlock.java.patch | 18 ++++-- .../world/level/block/HayBlock.java.patch | 10 +++- .../world/level/block/IceBlock.java.patch | 12 +++- .../world/level/block/KelpBlock.java.patch | 10 +++- .../world/level/block/LiquidBlock.java.patch | 14 ++++- .../world/level/block/MagmaBlock.java.patch | 10 +++- .../level/block/NetherPortalBlock.java.patch | 12 +++- .../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 | 10 +++- .../world/level/block/SlabBlock.java.patch | 10 +++- .../level/block/SnowLayerBlock.java.patch | 10 +++- .../world/level/block/SpawnerBlock.java.patch | 12 +++- .../world/level/block/SpongeBlock.java.patch | 14 ++++- .../level/block/StonecutterBlock.java.patch | 10 +++- .../level/block/SugarCaneBlock.java.patch | 12 +++- .../level/block/TurtleEggBlock.java.patch | 12 +++- .../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 | 16 +++-- .../EnchantingTableBlockEntity.java.patch | 14 ++++- .../block/entity/SignBlockEntity.java.patch | 18 ++++-- .../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 | 18 ++++-- .../level/material/WaterFluid.java.patch | 10 +++- .../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 +++- 223 files changed, 2426 insertions(+), 591 deletions(-) diff --git a/purpur-server/build.gradle.kts.patch b/purpur-server/build.gradle.kts.patch index 5ae07c4dd..6e782f80d 100644 --- a/purpur-server/build.gradle.kts.patch +++ b/purpur-server/build.gradle.kts.patch @@ -1,5 +1,63 @@ --- a/paper-server/build.gradle.kts +++ b/paper-server/build.gradle.kts +@@ -1,9 +_,7 @@ + import io.papermc.paperweight.attribute.DevBundleOutput + import io.papermc.paperweight.util.* +-import io.papermc.paperweight.util.data.FileEntry +-import paper.libs.com.google.gson.annotations.SerializedName + import java.time.Instant +-import kotlin.io.path.readText ++import kotlin.io.path.writeText + + plugins { + `java-library` +@@ -20,6 +_,46 @@ + testRuntimeOnly("org.junit.platform:junit-platform-launcher") + } + ++tasks.register("rebuildMinecraftSourcesWithGit") { ++ group = "temp" ++ ++ val patchDir = project.rootDir.resolve("purpur-server/minecraft-patches/sources").convertToPath().cleanDir() ++ val inputDir = this.project.rootDir.resolve("purpur-server/src/minecraft/java").convertToPath() ++ ++ val git = Git(inputDir) ++ git("stash", "push").executeSilently(silenceErr = true) ++ git("checkout", "file").executeSilently(silenceErr = true) ++ ++ rebuildWithGit(git, patchDir) ++} ++ ++private fun rebuildWithGit( ++ git: Git, ++ patchDir: java.nio.file.Path ++): Int { ++ val files = git("diff-tree", "--name-only", "--no-commit-id", "-r", "HEAD").getText().split("\n") ++ files.parallelStream().forEach { filename -> ++ if (filename.isBlank()) return@forEach ++ val patch = git( ++ "format-patch", ++ "--diff-algorithm=myers", ++ "--full-index", ++ "--no-signature", ++ "--no-stat", ++ "--no-numbered", ++ "-1", ++ "HEAD", ++ "--stdout", ++ filename ++ ).getText() ++ val patchFile = patchDir.resolve("$filename.patch") ++ patchFile.createParentDirectories() ++ patchFile.writeText(patch) ++ } ++ ++ return files.size ++} ++ + paperweight { + minecraftVersion = providers.gradleProperty("mcVersion") + gitFilePatches = false @@ -28,6 +_,18 @@ // oldPaperCommit = "f4f275519f7c1fbe9db173b7144a4fe81440e365" //} diff --git a/purpur-server/minecraft-patches/sources/io/papermc/paper/entity/activation/ActivationRange.java.patch b/purpur-server/minecraft-patches/sources/io/papermc/paper/entity/activation/ActivationRange.java.patch index cca45cce0..b4d83ca96 100644 --- a/purpur-server/minecraft-patches/sources/io/papermc/paper/entity/activation/ActivationRange.java.patch +++ b/purpur-server/minecraft-patches/sources/io/papermc/paper/entity/activation/ActivationRange.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java +index 2ebee223085fe7926c7f3e555df19ae69f36157e..265f20fd771df850a0bb0029e699d3146d883837 100644 --- a/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java -@@ -141,6 +_,8 @@ +@@ -141,6 +141,8 @@ public final class ActivationRange { continue; } @@ -9,7 +17,7 @@ final int worldHeight = world.getHeight(); ActivationRange.maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange); ActivationType.MISC.boundingBox = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange); -@@ -282,6 +_,7 @@ +@@ -282,6 +284,7 @@ public final class ActivationRange { * @return */ public static boolean checkIfActive(final Entity entity) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch index 52cafd0d1..0ecfb5660 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -30,6 +30,7 @@ public class CrashReport { private boolean trackingStackTrace = true; private StackTraceElement[] uncategorizedStackTrace = new StackTraceElement[0]; private final SystemReport systemReport = new SystemReport(); @@ -8,7 +16,7 @@ public CrashReport(String title, Throwable exception) { io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception); // Paper -@@ -130,7 +_,7 @@ +@@ -130,7 +131,7 @@ public class CrashReport { } public String getFriendlyReport(ReportType type) { @@ -17,7 +25,7 @@ } @Nullable -@@ -161,7 +_,7 @@ +@@ -161,7 +162,7 @@ public class CrashReport { } public boolean saveToFile(Path path, ReportType type) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/commands/CommandSourceStack.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/commands/CommandSourceStack.java.patch index cfbdec120..1314da7f1 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/commands/CommandSourceStack.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/commands/CommandSourceStack.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java +index cb63e4c264a31788cd1405428af70f7a018910e9..4d06587cd55af988eecdda5186577ab72ca3d533 100644 --- a/net/minecraft/commands/CommandSourceStack.java +++ b/net/minecraft/commands/CommandSourceStack.java -@@ -455,6 +_,19 @@ +@@ -455,6 +455,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/sources/net/minecraft/commands/Commands.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/commands/Commands.java.patch index bcd3caac9..a8a521ef4 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/commands/Commands.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/commands/Commands.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java +index 1927163db5d44383b69f41e4b9855535e853d127..603feb73bb5b45eec5984d27d0f5cf98ccc8420c 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -222,7 +_,7 @@ +@@ -222,7 +222,7 @@ public class Commands { JfrCommand.register(this.dispatcher); } @@ -9,7 +17,7 @@ RaidCommand.register(this.dispatcher, context); DebugPathCommand.register(this.dispatcher); DebugMobSpawningCommand.register(this.dispatcher); -@@ -250,6 +_,14 @@ +@@ -250,6 +250,14 @@ public class Commands { StopCommand.register(this.dispatcher); TransferCommand.register(this.dispatcher); WhitelistCommand.register(this.dispatcher); @@ -24,7 +32,7 @@ } if (selection.includeIntegrated) { -@@ -502,6 +_,7 @@ +@@ -502,6 +510,7 @@ public class Commands { 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 @@ -32,7 +40,7 @@ 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); -@@ -512,6 +_,7 @@ +@@ -512,6 +521,7 @@ public class Commands { } } // CraftBukkit end diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch index c89e997d6..2b06881db 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/commands/arguments/selector/EntitySelector.java b/net/minecraft/commands/arguments/selector/EntitySelector.java +index 514f8fbdeb776087608665c35de95294aadf5cf0..b305ba9bab617bf4e52d0e6ddf160bacc5751a94 100644 --- a/net/minecraft/commands/arguments/selector/EntitySelector.java +++ b/net/minecraft/commands/arguments/selector/EntitySelector.java -@@ -192,26 +_,27 @@ +@@ -192,26 +192,27 @@ public class EntitySelector { this.checkPermissions(source); if (this.playerName != null) { ServerPlayer playerByName = source.getServer().getPlayerList().getPlayerByName(this.playerName); @@ -32,7 +40,7 @@ players.add(serverPlayer1); if (players.size() >= resultLimit) { return players; -@@ -270,4 +_,10 @@ +@@ -270,4 +271,10 @@ public class EntitySelector { public static Component joinNames(List names) { return ComponentUtils.formatList(names, Entity::getDisplayName); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/core/BlockPos.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/core/BlockPos.java.patch index 8b669b1d6..86a42c71c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/core/BlockPos.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/core/BlockPos.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/core/BlockPos.java b/net/minecraft/core/BlockPos.java +index a81694a22e94cca6f7110f7d5b205d1303f4e071..6518d3fff6daf331b24a7bf5b39fa1920b73711d 100644 --- a/net/minecraft/core/BlockPos.java +++ b/net/minecraft/core/BlockPos.java -@@ -63,6 +_,12 @@ +@@ -63,6 +63,12 @@ public class BlockPos extends Vec3i { public static final int MAX_HORIZONTAL_COORDINATE = 33554431; // Paper end - Optimize Bit Operations by inlining diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch index 15ad30cf2..f7b3d00eb 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/core/dispenser/DispenseItemBehavior.java b/net/minecraft/core/dispenser/DispenseItemBehavior.java +index ca02c4c71a0a5a1a0ae8bbb40f0b1b7eac64e6fd..582e012222123e5001c34153f2ee1ab1d08935fd 100644 --- a/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -735,5 +_,22 @@ +@@ -735,5 +735,22 @@ public interface DispenseItemBehavior { 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/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch index 9a2c1e083..b4fdadcbc 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -32,7 +32,7 @@ public class EquipmentDispenseItemBehavior extends DefaultDispenseItemBehavior { 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 index 870429942..17ea862ad 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/gametest/framework/GameTestHelper.java b/net/minecraft/gametest/framework/GameTestHelper.java +index fafbc8a9229432c4fb290a54cf453cd0c0c7b3b6..fa7a2a85adf7758a753c54a7cf75cc667922d3d7 100644 --- a/net/minecraft/gametest/framework/GameTestHelper.java +++ b/net/minecraft/gametest/framework/GameTestHelper.java -@@ -292,6 +_,8 @@ +@@ -292,6 +292,8 @@ public class GameTestHelper { return gameType; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/network/Connection.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/network/Connection.java.patch index ac6b9a64d..68ff08029 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/network/Connection.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/network/Connection.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java +index 4ed9611994c5c8da01fede690197527c5b3a5731..00a82873d226f113278632a53c0faca420dd67d4 100644 --- a/net/minecraft/network/Connection.java +++ b/net/minecraft/network/Connection.java -@@ -588,11 +_,20 @@ +@@ -588,11 +588,20 @@ public class Connection extends SimpleChannelInboundHandler> { 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/sources/net/minecraft/network/chat/SignedMessageChain.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/network/chat/SignedMessageChain.java.patch index 60c29bda0..c5218eef6 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/network/chat/SignedMessageChain.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/network/chat/SignedMessageChain.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -45,7 +45,7 @@ public class SignedMessageChain { SignedMessageLink signedMessageLink = SignedMessageChain.this.nextLink; if (signedMessageLink == null) { throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.CHAIN_BROKEN); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch index 16550b7e6..1eb3d7c5c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java +index 9c9b601a3f903bebb0dd1bda0e24745587229727..29dd9a980bb7dc8457dd9ad6eeaa2c5067e3b954 100644 --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java -@@ -108,6 +_,12 @@ +@@ -108,6 +108,12 @@ public class Main { JvmProfiler.INSTANCE.start(Environment.SERVER); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch index 4d8cfe0ec..746aac419 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java +index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e61844572f47 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -283,6 +_,7 @@ +@@ -283,6 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; // Paper - don't store the vanilla dispatcher -@@ -293,7 +_,7 @@ +@@ -293,7 +294,7 @@ 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 @@ -26,7 +34,7 @@ public static S spin(Function threadFunction) { AtomicReference atomicReference = new AtomicReference<>(); -@@ -993,6 +_,15 @@ +@@ -993,6 +996,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java +index 52e0ae233a7b1c88bfbbc27707ef5f18453ec865..bc5fe40ba202bf80b925f08ceee045e8a69a7d45 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java -@@ -148,6 +_,7 @@ +@@ -148,6 +148,7 @@ public class PlayerAdvancements { AdvancementHolder advancementHolder = advancementManager.get(path); if (advancementHolder == null) { if (!path.getNamespace().equals(ResourceLocation.DEFAULT_NAMESPACE)) return; // CraftBukkit @@ -8,7 +16,7 @@ LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", path, this.playerSavePath); } else { this.startProgress(advancementHolder, progress); -@@ -195,6 +_,7 @@ +@@ -195,6 +196,7 @@ public class PlayerAdvancements { advancement.value().display().ifPresent(displayInfo -> { // Paper start - Add Adventure message to PlayerAdvancementDoneEvent if (event.message() != null && this.player.serverLevel().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/EnchantCommand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/EnchantCommand.java.patch index 6379c1d94..ccdc5faf5 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/EnchantCommand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/EnchantCommand.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/commands/EnchantCommand.java b/net/minecraft/server/commands/EnchantCommand.java +index 709690044ec506c50a73197f5ba43e89f3403a5e..60baf9a5dc4a583d08007acb68bbed61768270d5 100644 --- a/net/minecraft/server/commands/EnchantCommand.java +++ b/net/minecraft/server/commands/EnchantCommand.java -@@ -70,7 +_,7 @@ +@@ -70,7 +70,7 @@ public class EnchantCommand { private static int enchant(CommandSourceStack source, Collection targets, Holder enchantment, int level) throws CommandSyntaxException { Enchantment enchantment1 = enchantment.value(); @@ -9,7 +17,7 @@ throw ERROR_LEVEL_TOO_HIGH.create(level, enchantment1.getMaxLevel()); } else { int i = 0; -@@ -80,7 +_,7 @@ +@@ -80,7 +80,7 @@ public class EnchantCommand { ItemStack mainHandItem = livingEntity.getMainHandItem(); if (!mainHandItem.isEmpty()) { if (enchantment1.canEnchant(mainHandItem) diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GameModeCommand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GameModeCommand.java.patch index b1ef32c8b..67bc6d5de 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GameModeCommand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GameModeCommand.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/commands/GameModeCommand.java b/net/minecraft/server/commands/GameModeCommand.java +index c44cdbbdc06b25bd20a208386545a10af9b96df8..a88b8f999b181071ebb492bc1afa2d72fff3748e 100644 --- a/net/minecraft/server/commands/GameModeCommand.java +++ b/net/minecraft/server/commands/GameModeCommand.java -@@ -51,6 +_,18 @@ +@@ -51,6 +51,18 @@ public class GameModeCommand { } private static int setMode(CommandContext source, Collection players, GameType gameType) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch index 557923162..17dd8a921 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/commands/GiveCommand.java b/net/minecraft/server/commands/GiveCommand.java +index b81f98738ef166336e4cc3092b6ba63f385b68e3..ca4bad763602f202423409ffb16f797f91a5dadc 100644 --- a/net/minecraft/server/commands/GiveCommand.java +++ b/net/minecraft/server/commands/GiveCommand.java -@@ -66,6 +_,7 @@ +@@ -66,6 +66,7 @@ public class GiveCommand { i1 -= min; ItemStack itemStack1 = item.createItemStack(min, false); boolean flag = serverPlayer.getInventory().add(itemStack1); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch index e8a2669b4..3723a2ea6 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java +index 31e02f50edd46220dac81500dbb273f1ccdbe0b9..6a296adcd9d5289dd86840fdc58dce3accbe9ce5 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java -@@ -105,6 +_,7 @@ +@@ -105,6 +105,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface public void run() { if (!org.bukkit.craftbukkit.Main.useConsole) return; // CraftBukkit // Paper start - Use TerminalConsoleAppender @@ -8,7 +16,7 @@ new com.destroystokyo.paper.console.PaperConsole(DedicatedServer.this).start(); /* BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8)); -@@ -183,6 +_,15 @@ +@@ -183,6 +184,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface 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 @@ -24,7 +32,7 @@ com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now this.setPvpAllowed(properties.pvp); -@@ -230,6 +_,30 @@ +@@ -230,6 +240,30 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface if (true) throw new IllegalStateException("Failed to bind to port", var10); // Paper - Propagate failed to bind to port error return false; } @@ -55,7 +63,7 @@ // CraftBukkit start this.server.loadPlugins(); -@@ -308,6 +_,8 @@ +@@ -308,6 +342,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface LOGGER.info("JMX monitoring enabled"); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch index 14576e237..cc09a01a3 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/dedicated/DedicatedServerProperties.java b/net/minecraft/server/dedicated/DedicatedServerProperties.java +index f6518e29f805018c72222f5aaa7b662071665b65..5748658abf0b90812005ae9d426df92daf5532f0 100644 --- a/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -49,6 +_,7 @@ +@@ -49,6 +49,7 @@ public class DedicatedServerProperties extends Settings +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,11 @@ +@@ -39,6 +39,11 @@ public class MinecraftServerGui extends JComponent { private Thread logAppenderThread; private final Collection finalizers = Lists.newArrayList(); final AtomicBoolean isClosing = new AtomicBoolean(); @@ -12,7 +20,7 @@ public static MinecraftServerGui showFrameFor(final DedicatedServer server) { try { -@@ -46,7 +_,7 @@ +@@ -46,7 +51,7 @@ public class MinecraftServerGui extends JComponent { } catch (Exception var3) { } @@ -21,7 +29,7 @@ final MinecraftServerGui minecraftServerGui = new MinecraftServerGui(server); jFrame.setDefaultCloseOperation(2); jFrame.add(minecraftServerGui); -@@ -54,7 +_,7 @@ +@@ -54,7 +59,7 @@ public class MinecraftServerGui extends JComponent { jFrame.setLocationRelativeTo(null); jFrame.setVisible(true); // Paper start - Improve ServerGUI @@ -30,7 +38,7 @@ try { jFrame.setIconImage(javax.imageio.ImageIO.read(java.util.Objects.requireNonNull(MinecraftServerGui.class.getClassLoader().getResourceAsStream("logo.png")))); } catch (java.io.IOException ignore) { -@@ -64,7 +_,7 @@ +@@ -64,7 +69,7 @@ public class MinecraftServerGui extends JComponent { @Override public void windowClosing(WindowEvent event) { if (!minecraftServerGui.isClosing.getAndSet(true)) { @@ -39,7 +47,7 @@ server.halt(true); minecraftServerGui.runFinalizers(); } -@@ -112,7 +_,7 @@ +@@ -112,7 +117,7 @@ public class MinecraftServerGui extends JComponent { private JComponent buildChatPanel() { JPanel jPanel = new JPanel(new BorderLayout()); @@ -48,7 +56,7 @@ JScrollPane jScrollPane = new JScrollPane(jTextArea, 22, 30); jTextArea.setEditable(false); jTextArea.setFont(MONOSPACED); -@@ -121,10 +_,43 @@ +@@ -121,10 +126,43 @@ public class MinecraftServerGui extends JComponent { String trimmed = jTextField.getText().trim(); if (!trimmed.isEmpty()) { this.server.handleConsoleInput(trimmed, this.server.createCommandSourceStack()); @@ -92,7 +100,7 @@ jTextArea.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent event) { -@@ -159,7 +_,7 @@ +@@ -159,7 +197,7 @@ public class MinecraftServerGui extends JComponent { } private static final java.util.regex.Pattern ANSI = java.util.regex.Pattern.compile("\\e\\[[\\d;]*[^\\d;]"); // CraftBukkit // Paper @@ -101,7 +109,7 @@ if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(() -> this.print(textArea, scrollPane, line)); } else { -@@ -170,16 +_,29 @@ +@@ -170,10 +208,11 @@ public class MinecraftServerGui extends JComponent { flag = verticalScrollBar.getValue() + verticalScrollBar.getSize().getHeight() + MONOSPACED.getSize() * 4 > verticalScrollBar.getMaximum(); } @@ -115,10 +123,10 @@ 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 @@ -130,6 +138,7 @@ + } + } + // 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/sources/net/minecraft/server/gui/StatsComponent.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/gui/StatsComponent.java.patch index a082bca56..2dc512827 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/gui/StatsComponent.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/gui/StatsComponent.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -43,7 +43,7 @@ public class StatsComponent extends JComponent { } 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/sources/net/minecraft/server/level/ServerLevel.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerLevel.java.patch index 9671040f3..2c3ea23a4 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerLevel.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerLevel.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java +index bfbfbaa9660d21071c420b60b10be0a02a1bc87e..f3f53791d4c5532434abc281a5798ee0e2653da2 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -203,6 +_,8 @@ +@@ -203,6 +203,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private final StructureManager structureManager; private final StructureCheck structureCheck; private final boolean tickTime; @@ -9,7 +17,7 @@ private final RandomSequences randomSequences; // CraftBukkit start -@@ -587,7 +_,24 @@ +@@ -587,7 +589,24 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // CraftBukkit end this.tickTime = tickTime; this.server = server; @@ -35,7 +43,7 @@ this.serverLevelData = serverLevelData; ChunkGenerator chunkGenerator = levelStem.generator(); // CraftBukkit start -@@ -671,6 +_,7 @@ +@@ -671,6 +690,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe 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 @@ -43,7 +51,7 @@ } // Paper start -@@ -717,7 +_,7 @@ +@@ -717,7 +737,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); @@ -52,7 +60,7 @@ // 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( -@@ -836,6 +_,13 @@ +@@ -836,6 +856,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.serverLevelData.getScheduledEvents().tick(this.server, l); Profiler.get().pop(); if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) { @@ -66,11 +74,10 @@ this.setDayTime(this.levelData.getDayTime() + 1L); } } -@@ -843,7 +_,21 @@ +@@ -843,7 +870,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe public void setDayTime(long time) { this.serverLevelData.setDayTime(time); -- } + // Purpur start - Configurable daylight cycle + this.preciseTime = time; + this.forceTime = false; @@ -84,12 +91,12 @@ + // Purpur start - Configurable daylight cycle + public boolean isForceTime() { + return this.forceTime; -+ } + } + // Purpur end - Configurable daylight cycle public void tickCustomSpawners(boolean spawnEnemies, boolean spawnFriendlies) { for (CustomSpawner customSpawner : this.customSpawners) { -@@ -947,9 +_,17 @@ +@@ -947,9 +988,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe && 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(Blocks.LIGHTNING_ROD); if (flag) { @@ -109,7 +116,7 @@ skeletonHorse.setAge(0); skeletonHorse.setPos(blockPos.getX(), blockPos.getY(), blockPos.getZ()); this.addFreshEntity(skeletonHorse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit -@@ -984,9 +_,35 @@ +@@ -984,9 +1033,35 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (blockState.is(Blocks.SNOW)) { int layersValue = blockState.getValue(SnowLayerBlock.LAYERS); if (layersValue < Math.min(_int, 8)) { @@ -145,7 +152,7 @@ } } else { org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, heightmapPos, Blocks.SNOW.defaultBlockState(), 3, null); // CraftBukkit -@@ -1007,7 +_,7 @@ +@@ -1007,7 +1082,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe pointOfInterestType -> pointOfInterestType.is(PoiTypes.LIGHTNING_ROD), blockPos -> blockPos.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, blockPos.getX(), blockPos.getZ()) - 1, pos, @@ -154,7 +161,7 @@ PoiManager.Occupancy.ANY ); return optional.map(blockPos -> blockPos.above(1)); -@@ -1056,8 +_,26 @@ +@@ -1056,8 +1131,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); Component component; if (this.sleepStatus.areEnoughSleeping(_int)) { @@ -181,7 +188,7 @@ component = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(_int)); } -@@ -1190,6 +_,7 @@ +@@ -1190,6 +1283,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @VisibleForTesting public void resetWeatherCycle() { // CraftBukkit start @@ -189,7 +196,7 @@ 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.... -@@ -1197,6 +_,7 @@ +@@ -1197,6 +1291,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.serverLevelData.setRainTime(0); } // CraftBukkit end @@ -197,7 +204,7 @@ 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. -@@ -2674,7 +_,7 @@ +@@ -2674,7 +2769,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // 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/sources/net/minecraft/server/level/ServerPlayer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch index ddca6f955..31778e737 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java +index 3781d9cc174b7aecacb9b9855d52c7b1ff05835c..5ced523477c2b86e2b46182a77a9d991cf4cdd1f 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -420,6 +_,10 @@ +@@ -420,6 +420,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent public @Nullable String clientBrandName = null; // Paper - Brand support 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 @@ -11,7 +19,7 @@ // Paper start - rewrite chunk system private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader; -@@ -553,6 +_,10 @@ +@@ -553,6 +557,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.respawnConfig = compound.read("respawn", ServerPlayer.RespawnConfig.CODEC).orElse(null); this.spawnExtraParticlesOnFall = compound.getBooleanOr("spawn_extra_particles_on_fall", false); this.raidOmenPosition = compound.read("raid_omen_position", BlockPos.CODEC).orElse(null); @@ -22,7 +30,7 @@ } @Override -@@ -570,6 +_,9 @@ +@@ -570,6 +578,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc compound.storeNullable("raid_omen_position", BlockPos.CODEC, this.raidOmenPosition); this.saveEnderPearls(compound); this.getBukkitEntity().setExtraData(compound); // CraftBukkit @@ -32,7 +40,7 @@ } private void saveParentVehicle(CompoundTag tag) { -@@ -1063,6 +_,7 @@ +@@ -1063,6 +1074,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc // Paper - moved up to sendClientboundPlayerCombatKillPacket() sendClientboundPlayerCombatKillPacket(event.getShowDeathMessages(), deathScreenMessage); // Paper - Expand PlayerDeathEvent Team team = this.getTeam(); @@ -40,7 +48,7 @@ if (team == null || team.getDeathMessageVisibility() == Team.Visibility.ALWAYS) { this.server.getPlayerList().broadcastSystemMessage(deathMessage, false); } else if (team.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) { -@@ -1169,6 +_,13 @@ +@@ -1169,6 +1181,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc if (this.isInvulnerableTo(level, damageSource)) { return false; } else { @@ -54,7 +62,7 @@ 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)) -@@ -1395,6 +_,7 @@ +@@ -1395,6 +1414,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc serverLevel.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); this.unsetRemoved(); // CraftBukkit end @@ -62,7 +70,7 @@ this.setServerLevel(level); this.connection.internalTeleport(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives()); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); -@@ -1512,7 +_,7 @@ +@@ -1512,7 +1532,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.serverLevel(), this) ); @@ -71,7 +79,7 @@ return Either.left(Player.BedSleepingProblem.NOT_SAFE); } } -@@ -1549,7 +_,19 @@ +@@ -1549,7 +1569,19 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc CriteriaTriggers.SLEPT_IN_BED.trigger(this); }); if (!this.serverLevel().canSleepThroughNights()) { @@ -92,7 +100,7 @@ } ((ServerLevel)this.level()).updateSleepingPlayerList(); -@@ -1641,6 +_,7 @@ +@@ -1641,6 +1673,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void openTextEdit(SignBlockEntity signEntity, boolean isFrontText) { @@ -100,7 +108,7 @@ this.connection.send(new ClientboundBlockUpdatePacket(this.level(), signEntity.getBlockPos())); this.connection.send(new ClientboundOpenSignEditorPacket(signEntity.getBlockPos(), isFrontText)); } -@@ -1943,6 +_,26 @@ +@@ -1943,6 +1976,26 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.lastSentExp = -1; // CraftBukkit - Added to reset } @@ -127,7 +135,7 @@ @Override public void displayClientMessage(Component chatComponent, boolean actionBar) { this.sendSystemMessage(chatComponent, actionBar); -@@ -2160,6 +_,20 @@ +@@ -2160,6 +2213,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc ); } @@ -148,14 +156,13 @@ public void sendSystemMessage(Component mesage) { this.sendSystemMessage(mesage, false); } -@@ -2298,7 +_,67 @@ +@@ -2298,8 +2365,68 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc public void resetLastActionTime() { this.lastActionTime = Util.getMillis(); -- } + this.setAfk(false); // Purpur - AFK API -+ } -+ + } + + // Purpur start - AFK API + private boolean isAfk = false; + @@ -214,10 +221,11 @@ + return !this.isAfk() && super.canBeCollidedWith(); + } + // Purpur end - AFK API - ++ public ServerStatsCounter getStats() { return this.stats; -@@ -2926,4 +_,56 @@ + } +@@ -2926,4 +3053,56 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch index f28a3de6d..3d32ad621 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java +index b604cba2490a747661d6819251bc3b9a1d35c7d4..3a596650feb96123c5684bb5065e20c5b005c0b9 100644 --- a/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -348,6 +_,7 @@ +@@ -348,6 +348,7 @@ public class ServerPlayerGameMode { } return false; } @@ -8,7 +16,7 @@ } // CraftBukkit end -@@ -461,6 +_,7 @@ +@@ -461,6 +462,7 @@ public class ServerPlayerGameMode { public InteractionHand interactHand; public ItemStack interactItemStack; public InteractionResult useItemOn(ServerPlayer player, Level level, ItemStack stack, InteractionHand hand, BlockHitResult hitResult) { @@ -16,7 +24,7 @@ BlockPos blockPos = hitResult.getBlockPos(); BlockState blockState = level.getBlockState(blockPos); boolean cancelledBlock = false; -@@ -503,7 +_,7 @@ +@@ -503,7 +505,7 @@ public class ServerPlayerGameMode { boolean flag = !player.getMainHandItem().isEmpty() || !player.getOffhandItem().isEmpty(); boolean flag1 = player.isSecondaryUseActive() && flag; ItemStack itemStack = stack.copy(); @@ -25,7 +33,7 @@ InteractionResult interactionResult = blockState.useItemOn(player.getItemInHand(hand), level, player, hand, hitResult); if (interactionResult.consumesAction()) { CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger(player, blockPos, itemStack); -@@ -549,4 +_,18 @@ +@@ -549,4 +551,18 @@ public class ServerPlayerGameMode { public void setLevel(ServerLevel serverLevel) { this.level = serverLevel; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch index ab71931ac..9232e8f23 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/level/WorldGenRegion.java b/net/minecraft/server/level/WorldGenRegion.java +index 11fed81a4696ba18440e755c3b8a5ca39ed8a6b1..18367ee56288c4cc60b66555583a8900e7a47daf 100644 --- a/net/minecraft/server/level/WorldGenRegion.java +++ b/net/minecraft/server/level/WorldGenRegion.java -@@ -314,6 +_,7 @@ +@@ -314,6 +314,7 @@ public class WorldGenRegion implements WorldGenLevel { return true; } else { // Paper start - Buffer OOB setBlock calls diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch index 274dd957b..2c2fd3850 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +index 186393485396cfe9b1baef29586198356e2d2600..66d70c330fd70009018d8d0a7441b93fcef96c97 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -41,6 +_,7 @@ +@@ -41,6 +41,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack private long keepAliveChallenge; private long closedListenerTime; private boolean closed = false; @@ -8,7 +16,7 @@ private int latency; private volatile boolean suspendFlushingOnServerThread = false; // CraftBukkit start -@@ -51,6 +_,7 @@ +@@ -51,6 +52,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack 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 @@ -16,7 +24,7 @@ public ServerCommonPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie cookie, net.minecraft.server.level.ServerPlayer player) { // CraftBukkit this.server = server; -@@ -118,6 +_,16 @@ +@@ -118,6 +120,16 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { @@ -33,7 +41,7 @@ if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) { int i = (int)(Util.getMillis() - this.keepAliveTime); this.latency = (this.latency * 3 + i) / 4; -@@ -169,6 +_,12 @@ +@@ -169,6 +181,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack return; } @@ -46,7 +54,7 @@ if (identifier.equals(MINECRAFT_BRAND)) { this.player.clientBrandName = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.wrappedBuffer(data)).readUtf(256); } -@@ -242,6 +_,22 @@ +@@ -242,6 +260,22 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack // Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings // This should effectively place the keepalive handling back to "as it was" before 1.12.2 final long elapsedTime = millis - this.keepAliveTime; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch index aef98e0f9..ca7bc5528 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index 9041830c19e2899479e1519488faba5c416ccd88..bf8a8124145e4339cadcc83691f076bdad3ec43d 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -321,6 +_,20 @@ +@@ -321,6 +321,20 @@ public class ServerGamePacketListenerImpl this.tickEndEvent = new io.papermc.paper.event.packet.ClientTickEndEvent(player.getBukkitEntity()); // Paper - add client tick end event } @@ -21,7 +29,7 @@ @Override public void tick() { if (this.ackBlockChangesUpTo > -1) { -@@ -379,6 +_,12 @@ +@@ -379,6 +393,12 @@ public class ServerGamePacketListenerImpl if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > this.server.getPlayerIdleTimeout() * 1000L * 60L && !this.player.wonGame) { // Paper - Prevent AFK kick while watching end credits @@ -34,7 +42,7 @@ this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854 this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause } -@@ -624,6 +_,8 @@ +@@ -624,6 +644,8 @@ public class ServerGamePacketListenerImpl this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -43,7 +51,7 @@ Location oldTo = to.clone(); PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); this.cserver.getPluginManager().callEvent(event); -@@ -703,6 +_,7 @@ +@@ -703,6 +725,7 @@ public class ServerGamePacketListenerImpl PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (packet.getId() == this.awaitingTeleport) { if (this.awaitingPositionFromClient == null) { @@ -51,7 +59,7 @@ this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause return; } -@@ -1233,6 +_,10 @@ +@@ -1233,6 +1256,10 @@ public class ServerGamePacketListenerImpl 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; @@ -62,7 +70,7 @@ for (final String page : pageList) { final int byteLength = page.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; byteTotal += byteLength; -@@ -1257,7 +_,8 @@ +@@ -1257,7 +1284,8 @@ public class ServerGamePacketListenerImpl } if (byteTotal > byteAllowed) { @@ -72,7 +80,7 @@ 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; } -@@ -1276,31 +_,45 @@ +@@ -1276,31 +1304,45 @@ public class ServerGamePacketListenerImpl Optional optional = packet.title(); optional.ifPresent(list::add); list.addAll(packet.pages()); @@ -122,7 +130,7 @@ itemStack.set( DataComponents.WRITTEN_BOOK_CONTENT, new WrittenBookContent(this.filterableFromOutgoing(title), this.player.getName().getString(), 0, list, true) -@@ -1314,6 +_,16 @@ +@@ -1314,6 +1356,16 @@ public class ServerGamePacketListenerImpl return this.player.isTextFilteringEnabled() ? Filterable.passThrough(filteredText.filteredOrEmpty()) : Filterable.from(filteredText); } @@ -139,7 +147,7 @@ @Override public void handleEntityTagQuery(ServerboundEntityTagQueryPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); -@@ -1349,7 +_,15 @@ +@@ -1349,7 +1401,15 @@ public class ServerGamePacketListenerImpl @Override public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); @@ -156,7 +164,7 @@ 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.serverLevel(); -@@ -1531,7 +_,7 @@ +@@ -1531,7 +1591,7 @@ public class ServerGamePacketListenerImpl movedWrongly = true; if (event.getLogWarning()) // Paper end @@ -165,7 +173,7 @@ } // Paper } -@@ -1597,6 +_,8 @@ +@@ -1597,6 +1657,8 @@ public class ServerGamePacketListenerImpl this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -174,7 +182,7 @@ Location oldTo = to.clone(); PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); this.cserver.getPluginManager().callEvent(event); -@@ -1652,6 +_,13 @@ +@@ -1652,6 +1714,13 @@ public class ServerGamePacketListenerImpl this.player.tryResetCurrentImpulseContext(); } @@ -188,7 +196,7 @@ 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(); -@@ -1669,6 +_,17 @@ +@@ -1669,6 +1738,17 @@ public class ServerGamePacketListenerImpl } } @@ -206,7 +214,7 @@ private boolean shouldCheckPlayerMovement(boolean isElytraMovement) { if (this.isSingleplayerOwner()) { return false; -@@ -2065,6 +_,7 @@ +@@ -2065,6 +2145,7 @@ public class ServerGamePacketListenerImpl boolean cancelled; if (hitResult == null || hitResult.getType() != HitResult.Type.BLOCK) { @@ -214,7 +222,7 @@ org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemInHand, hand); cancelled = event.useItemInHand() == Event.Result.DENY; } else { -@@ -2737,6 +_,7 @@ +@@ -2737,6 +2818,7 @@ public class ServerGamePacketListenerImpl 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 diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch index dfa6db0dc..6b43b0aa8 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +index 7950f4f88d8a83ed5610b7af4e134557d32da3f0..637b2eb7104cb0bc7f314ad6eea11a432e899861 100644 --- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -306,7 +_,7 @@ +@@ -306,7 +306,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, 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/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch index 3fc9d014a..8f27573c6 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -37,6 +37,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene } else { this.hasRequestedStatus = true; // this.connection.send(new ClientboundStatusResponsePacket(this.status)); // Paper diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/players/PlayerList.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/players/PlayerList.java.patch index 33ba84a58..2ca3c74f1 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/players/PlayerList.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/players/PlayerList.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java +index 9ca3c55a3b5b1a532b86b08eb92460df4cb54f2a..f7b12d5924005a24899aef11746b9f056fac3559 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -400,6 +_,7 @@ +@@ -400,6 +400,7 @@ public abstract class PlayerList { scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); } // Paper end - Configurable player collision @@ -8,7 +16,7 @@ PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); // Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead if (player.isDeadOrDying()) { -@@ -505,6 +_,7 @@ +@@ -505,6 +506,7 @@ public abstract class PlayerList { } public @Nullable net.kyori.adventure.text.Component remove(ServerPlayer player, net.kyori.adventure.text.Component leaveMessage) { // Paper end - Fix kick event leave message not being sent @@ -16,7 +24,7 @@ ServerLevel serverLevel = player.serverLevel(); player.awardStat(Stats.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it -@@ -663,7 +_,7 @@ +@@ -663,7 +665,7 @@ public abstract class PlayerList { // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile) // ? Component.translatable("multiplayer.disconnect.server_full") // : null; @@ -25,7 +33,7 @@ event.disallow(org.bukkit.event.player.PlayerLoginEvent.Result.KICK_FULL, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure } } -@@ -932,6 +_,20 @@ +@@ -932,6 +934,20 @@ public abstract class PlayerList { } } @@ -46,7 +54,7 @@ public void broadcastAll(Packet packet, ResourceKey dimension) { for (ServerPlayer serverPlayer : this.players) { if (serverPlayer.level().dimension() == dimension) { -@@ -1016,6 +_,7 @@ +@@ -1016,6 +1032,7 @@ public abstract class PlayerList { } else { b = (byte)(24 + permLevel); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/server/players/SleepStatus.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/server/players/SleepStatus.java.patch index 998d2f057..e52bc72e9 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/server/players/SleepStatus.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/server/players/SleepStatus.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -15,7 +15,7 @@ public class SleepStatus { public boolean areEnoughDeepSleeping(int requiredSleepPercentage, List sleepingPlayers) { // CraftBukkit start @@ -9,7 +17,7 @@ boolean anyDeepSleep = sleepingPlayers.stream().anyMatch(Player::isSleepingLongEnough); return anyDeepSleep && i >= this.sleepersNeeded(requiredSleepPercentage); // CraftBukkit end -@@ -43,7 +_,7 @@ +@@ -43,7 +43,7 @@ public class SleepStatus { for (ServerPlayer serverPlayer : players) { if (!serverPlayer.isSpectator()) { this.activePlayers++; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch index f4855d61c..ab522903f 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/stats/ServerRecipeBook.java b/net/minecraft/stats/ServerRecipeBook.java +index 2158b20458de63897131db3d425d1efcc358cace..7bd35dba7c7536e5451603759e004e1e31a9b614 100644 --- a/net/minecraft/stats/ServerRecipeBook.java +++ b/net/minecraft/stats/ServerRecipeBook.java -@@ -133,6 +_,7 @@ +@@ -133,6 +133,7 @@ public class ServerRecipeBook extends RecipeBook { private void loadRecipes(List>> recipes, Consumer>> output, Predicate>> isRecognized) { for (ResourceKey> resourceKey : recipes) { if (!isRecognized.test(resourceKey)) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/util/StringUtil.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/util/StringUtil.java.patch index b8d231182..0acbf24a2 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/util/StringUtil.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/util/StringUtil.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/util/StringUtil.java b/net/minecraft/util/StringUtil.java +index 77947e6915facee44588943fcd3e5b513de37e77..c3a99fe7b49858bc0ca9a7f800b0db40465f6901 100644 --- a/net/minecraft/util/StringUtil.java +++ b/net/minecraft/util/StringUtil.java -@@ -87,6 +_,7 @@ +@@ -87,6 +87,7 @@ public class StringUtil { // Paper start - Username validation public static boolean isReasonablePlayerName(final String name) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatRules.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatRules.java.patch index a70c7a253..e7f19bda9 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatRules.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatRules.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/damagesource/CombatRules.java b/net/minecraft/world/damagesource/CombatRules.java +index d5524038314591a10c9f08a68e2ac91f6079a897..bf82de45bf98e8605a1fdb69803f75f471c4af43 100644 --- a/net/minecraft/world/damagesource/CombatRules.java +++ b/net/minecraft/world/damagesource/CombatRules.java -@@ -15,7 +_,7 @@ +@@ -15,7 +15,7 @@ public class CombatRules { public static float getDamageAfterAbsorb(LivingEntity entity, float damage, DamageSource damageSource, float armorValue, float armorToughness) { float f = 2.0F + armorToughness / 4.0F; @@ -9,7 +17,7 @@ float f2 = f1 / 25.0F; ItemStack weaponItem = damageSource.getWeaponItem(); float f3; -@@ -30,7 +_,7 @@ +@@ -30,7 +30,7 @@ public class CombatRules { } public static float getDamageAfterMagicAbsorb(float damage, float enchantModifiers) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatTracker.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatTracker.java.patch index 2bc01f621..9ee472807 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatTracker.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/CombatTracker.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -64,7 +64,7 @@ public class CombatTracker { private Component getMessageForAssistedFall(Entity entity, Component entityDisplayName, String hasWeaponTranslationKey, String noWeaponTranslationKey) { ItemStack itemStack = entity instanceof LivingEntity livingEntity ? livingEntity.getMainHandItem() : ItemStack.EMPTY; @@ -9,7 +17,7 @@ ? Component.translatable(hasWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName, itemStack.getDisplayName()) : Component.translatable(noWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName); } -@@ -108,6 +_,15 @@ +@@ -108,6 +108,15 @@ public class CombatTracker { 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/sources/net/minecraft/world/damagesource/DamageSource.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch index 581f8d027..8b6388ba5 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,8 @@ +@@ -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) private boolean critical; // Supports arrows and sweeping damage @@ -9,7 +17,7 @@ public DamageSource knownCause(final org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) { final DamageSource damageSource = this.copy(); -@@ -42,6 +_,30 @@ +@@ -42,6 +44,30 @@ public class DamageSource { return this.knownCause; } @@ -40,7 +48,7 @@ @Nullable public Entity eventEntityDamager() { return this.eventEntityDamager; -@@ -103,6 +_,8 @@ +@@ -103,6 +129,8 @@ public class DamageSource { damageSource.eventBlockDamager = this.eventBlockDamager; damageSource.fromBlockSnapshot = this.fromBlockSnapshot; damageSource.critical = this.critical; @@ -49,7 +57,7 @@ return damageSource; } // CraftBukkit end -@@ -169,11 +_,20 @@ +@@ -169,12 +197,21 @@ public class DamageSource { } else { Component component = this.causingEntity == null ? this.directEntity.getDisplayName() : this.causingEntity.getDisplayName(); ItemStack itemStack = this.causingEntity instanceof LivingEntity livingEntity1 ? livingEntity1.getMainHandItem() : ItemStack.EMPTY; @@ -59,7 +67,7 @@ : 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()); @@ -68,6 +76,7 @@ + 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/sources/net/minecraft/world/damagesource/DamageSources.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch index 29006dbaf..d3490d766 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,8 @@ +@@ -42,6 +42,8 @@ public class DamageSources { private final DamageSource stalagmite; private final DamageSource outsideBorder; private final DamageSource genericKill; @@ -9,7 +17,7 @@ public DamageSources(RegistryAccess registry) { this.damageTypes = registry.lookupOrThrow(Registries.DAMAGE_TYPE); -@@ -70,6 +_,8 @@ +@@ -70,6 +72,8 @@ public class DamageSources { this.stalagmite = this.source(DamageTypes.STALAGMITE); this.outsideBorder = this.source(DamageTypes.OUTSIDE_BORDER); this.genericKill = this.source(DamageTypes.GENERIC_KILL); @@ -18,11 +26,10 @@ } private DamageSource source(ResourceKey damageTypeKey) { -@@ -83,6 +_,18 @@ - private DamageSource source(ResourceKey damageTypeKey, @Nullable Entity causingEntity, @Nullable Entity directEntity) { +@@ -84,6 +88,18 @@ public class DamageSources { return new DamageSource(this.damageTypes.getOrThrow(damageTypeKey), causingEntity, directEntity); } -+ + + // Purpur start - Dont run with scissor + public DamageSource scissors() { + return this.scissors; @@ -34,6 +41,7 @@ + return this.stonecutter; + } + // Purpur end - Stonecutter damage - ++ public DamageSource inFire() { return this.inFire; + } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch index ea284de7b..a368f6b64 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -12,7 +12,7 @@ class HungerMobEffect extends MobEffect { @Override public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { if (entity instanceof Player player) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch index 0e8d7e3f7..08fba0133 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,8 @@ +@@ -12,8 +12,8 @@ public class PoisonMobEffect extends MobEffect { @Override public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch index f19f319af..41003563d 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -11,7 +11,7 @@ class RegenerationMobEffect extends MobEffect { @Override public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { if (entity.getHealth() < entity.getMaxHealth()) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch index f2d21d380..4674ebbb3 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,8 @@ +@@ -16,7 +16,8 @@ class SaturationMobEffect extends InstantenousMobEffect { 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/sources/net/minecraft/world/effect/WitherMobEffect.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/WitherMobEffect.java.patch index 767637659..ec94a99cb 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/WitherMobEffect.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/effect/WitherMobEffect.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -12,7 +12,7 @@ public class WitherMobEffect extends MobEffect { @Override public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch index b88e9207b..6ea886bd7 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java +index 22d91f99c50e3b3b88ccab4eb5d1b71be5a9dcd8..b8a0abd1cbdc0c86ae9e68ebaeec14cd4728450e 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -141,6 +_,7 @@ +@@ -141,6 +141,7 @@ import net.minecraft.world.scores.Team; import org.jetbrains.annotations.Contract; public abstract class Entity implements SyncedDataHolder, Nameable, 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 @@ -8,7 +16,7 @@ // CraftBukkit start private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger(); private static final int CURRENT_LEVEL = 2; -@@ -260,8 +_,9 @@ +@@ -260,8 +261,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public double xOld; public double yOld; public double zOld; @@ -19,7 +27,7 @@ public int tickCount; private int remainingFireTicks = -this.getFireImmuneTicks(); public boolean wasTouchingWater; -@@ -295,8 +_,8 @@ +@@ -295,8 +297,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public PortalProcessor portalProcess; public int portalCooldown; private boolean invulnerable; @@ -30,7 +38,7 @@ 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}; -@@ -350,6 +_,7 @@ +@@ -350,6 +352,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public long activatedTick = Integer.MIN_VALUE; public boolean isTemporarilyActive; public long activatedImmunityTick = Integer.MIN_VALUE; @@ -38,7 +46,7 @@ public void inactiveTick() { } -@@ -512,10 +_,21 @@ +@@ -512,10 +515,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper end - optimise entity tracker @@ -60,7 +68,7 @@ this.position = Vec3.ZERO; this.blockPosition = BlockPos.ZERO; this.chunkPosition = ChunkPos.ZERO; -@@ -885,6 +_,7 @@ +@@ -885,6 +899,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { // Paper end - Configurable nether ceiling damage @@ -68,7 +76,7 @@ this.onBelowWorld(); } } -@@ -1830,7 +_,7 @@ +@@ -1830,7 +1845,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean fireImmune() { @@ -77,7 +85,7 @@ } public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) { -@@ -1890,7 +_,7 @@ +@@ -1890,7 +1905,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.isInWater() || flag; } @@ -86,7 +94,7 @@ if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) { this.wasTouchingWater = false; } else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) { -@@ -2516,6 +_,13 @@ +@@ -2516,6 +2531,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess compound.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -100,7 +108,7 @@ return compound; } catch (Throwable var8) { CrashReport crashReport = CrashReport.forThrowable(var8, "Saving entity NBT"); -@@ -2646,6 +_,13 @@ +@@ -2646,6 +2668,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess freezeLocked = compound.getBooleanOr("Paper.FreezeLock", false); } // Paper end @@ -114,7 +122,7 @@ } catch (Throwable var8) { CrashReport crashReport = CrashReport.forThrowable(var8, "Loading entity NBT"); CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded"); -@@ -2874,6 +_,7 @@ +@@ -2874,6 +2903,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (this.isAlive() && this instanceof Leashable leashable) { if (leashable.getLeashHolder() == player) { if (!this.level().isClientSide()) { @@ -122,7 +130,7 @@ // CraftBukkit start - fire PlayerUnleashEntityEvent // Paper start - Expand EntityUnleashEvent org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials()); -@@ -3190,15 +_,18 @@ +@@ -3190,15 +3220,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Vec3.directionFromRotation(this.getRotationVector()); } @@ -142,7 +150,7 @@ } } } -@@ -3403,7 +_,7 @@ +@@ -3403,7 +3436,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public int getMaxAirSupply() { @@ -151,7 +159,7 @@ } public int getAirSupply() { -@@ -3931,7 +_,7 @@ +@@ -3931,7 +3964,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public boolean canUsePortal(boolean allowPassengers) { @@ -160,7 +168,7 @@ } public boolean canTeleport(Level fromLevel, Level toLevel) { -@@ -4468,6 +_,12 @@ +@@ -4468,6 +4501,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Mth.lerp(partialTick, this.yRotO, this.yRot); } @@ -173,7 +181,7 @@ // Paper start - optimise collisions public boolean updateFluidHeightAndDoFluidPushing(final TagKey fluid, final double flowScale) { if (this.touchingUnloadedChunk()) { -@@ -4876,7 +_,7 @@ +@@ -4876,7 +4915,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public float maxUpStep() { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch index ff1e039a1..bcd07edf0 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/EntitySelector.java b/net/minecraft/world/entity/EntitySelector.java +index bfd58eb04eee606ac0a8071de9bf75f46c35decb..0c1953754220ff72e18f0396134507d93ba7b1b8 100644 --- a/net/minecraft/world/entity/EntitySelector.java +++ b/net/minecraft/world/entity/EntitySelector.java -@@ -28,6 +_,8 @@ +@@ -28,6 +28,8 @@ public final class EntitySelector { 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/sources/net/minecraft/world/entity/EntityType.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntityType.java.patch index 5fb68cfd6..b4f08e260 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntityType.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntityType.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java +index ed11697d81789ee6cd48ee2de2c9fcb8ff2be0d4..d6a0ad078fd1f0350afaac3f1743896d73b015e1 100644 --- a/net/minecraft/world/entity/EntityType.java +++ b/net/minecraft/world/entity/EntityType.java -@@ -1095,6 +_,16 @@ +@@ -1095,6 +1095,16 @@ public class EntityType implements FeatureElement, EntityTypeT return register(vanillaEntityId(key), builder); } @@ -17,7 +25,7 @@ public static ResourceLocation getKey(EntityType entityType) { return BuiltInRegistries.ENTITY_TYPE.getKey(entityType); } -@@ -1325,6 +_,16 @@ +@@ -1325,6 +1335,16 @@ public class EntityType implements FeatureElement, EntityTypeT return this.category; } @@ -34,7 +42,7 @@ public String getDescriptionId() { return this.descriptionId; } -@@ -1384,7 +_,11 @@ +@@ -1384,7 +1404,11 @@ public class EntityType implements FeatureElement, EntityTypeT entity.load(tag); }, // Paper end - Don't fire sync event during generation diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch index f77455e12..a286a6404 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java +index c97a0e500e889b406cb2d679a3870715775f5393..81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5 100644 --- a/net/minecraft/world/entity/ExperienceOrb.java +++ b/net/minecraft/world/entity/ExperienceOrb.java -@@ -328,7 +_,7 @@ +@@ -328,7 +328,7 @@ public class ExperienceOrb extends Entity { 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 @@ -9,7 +17,7 @@ entity.take(this, 1); int i = this.repairPlayerItems(serverPlayer, this.getValue()); if (i > 0) { -@@ -344,7 +_,7 @@ +@@ -344,7 +344,7 @@ public class ExperienceOrb extends Entity { } private int repairPlayerItems(ServerPlayer player, int value) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/GlowSquid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/GlowSquid.java.patch index 932024a00..7bd87b59a 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/GlowSquid.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/GlowSquid.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/GlowSquid.java b/net/minecraft/world/entity/GlowSquid.java +index 3f351fdb3cb76612d88bde713a2639d4319a7c6d..bda521cca91f070139f5e9bdef6a50e1497f53ff 100644 --- a/net/minecraft/world/entity/GlowSquid.java +++ b/net/minecraft/world/entity/GlowSquid.java -@@ -26,6 +_,13 @@ +@@ -26,6 +26,13 @@ public class GlowSquid extends Squid { super(entityType, level); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch index 18edfcd80..677fb9bdf 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java +index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..20d9856daa5ef4c42010381091c2a85e0755fa77 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -430,6 +_,12 @@ +@@ -430,6 +430,12 @@ public abstract class LivingEntity extends Entity implements Attackable { if (d < 0.0) { double damagePerBlock = serverLevel1.getWorldBorder().getDamagePerBlock(); if (damagePerBlock > 0.0) { @@ -13,7 +21,7 @@ this.hurtServer(serverLevel1, this.damageSources().outOfBorder(), Math.max(1, Mth.floor(-d * damagePerBlock))); } } -@@ -442,10 +_,10 @@ +@@ -442,10 +448,10 @@ public abstract class LivingEntity extends Entity implements Attackable { && (!flag || !((Player)this).getAbilities().invulnerable); if (flag1) { this.setAirSupply(this.decreaseAirSupply(this.getAirSupply())); @@ -26,7 +34,7 @@ } } else if (this.getAirSupply() < this.getMaxAirSupply()) { this.setAirSupply(this.increaseAirSupply(this.getAirSupply())); -@@ -1014,14 +_,32 @@ +@@ -1014,15 +1020,33 @@ public abstract class LivingEntity extends Entity implements Attackable { if (lookingEntity != null) { ItemStack itemBySlot = this.getItemBySlot(EquipmentSlot.HEAD); EntityType type = lookingEntity.getType(); @@ -36,15 +44,13 @@ - || 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; + } @@ -52,8 +58,8 @@ + 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)) { @@ -64,10 +70,11 @@ + } + } + // Purpur end - Configurable mob blindness - ++ return d; } -@@ -1068,6 +_,7 @@ + +@@ -1068,6 +1092,7 @@ public abstract class LivingEntity extends Entity implements Attackable { Iterator iterator = this.activeEffects.values().iterator(); while (iterator.hasNext()) { MobEffectInstance effect = iterator.next(); @@ -75,7 +82,7 @@ EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED); if (event.isCancelled()) { continue; -@@ -1385,6 +_,24 @@ +@@ -1385,6 +1410,24 @@ public abstract class LivingEntity extends Entity implements Attackable { this.stopSleeping(); } @@ -100,7 +107,7 @@ this.noActionTime = 0; if (amount < 0.0F) { amount = 0.0F; -@@ -1646,10 +_,10 @@ +@@ -1646,10 +1689,10 @@ public abstract class LivingEntity extends Entity implements Attackable { protected Player resolvePlayerResponsibleForDamage(DamageSource damageSource) { Entity entity = damageSource.getEntity(); if (entity instanceof Player player) { @@ -113,7 +120,7 @@ } else { this.lastHurtByPlayer = null; this.lastHurtByPlayerMemoryTime = 0; -@@ -1700,6 +_,18 @@ +@@ -1700,6 +1743,18 @@ public abstract class LivingEntity extends Entity implements Attackable { } } @@ -132,7 +139,7 @@ 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); -@@ -1875,6 +_,7 @@ +@@ -1875,6 +1930,7 @@ public abstract class LivingEntity extends Entity implements Attackable { boolean flag = this.lastHurtByPlayerMemoryTime > 0; this.dropEquipment(level); // CraftBukkit - from below if (this.shouldDropLoot() && level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { @@ -140,7 +147,7 @@ this.dropFromLootTable(level, damageSource, flag); // Paper start final boolean prev = this.clearEquipmentSlots; -@@ -1883,6 +_,7 @@ +@@ -1883,6 +1939,7 @@ public abstract class LivingEntity extends Entity implements Attackable { // Paper end this.dropCustomDeathLoot(level, damageSource, flag); this.clearEquipmentSlots = prev; // Paper @@ -148,7 +155,7 @@ } // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment -@@ -3057,6 +_,7 @@ +@@ -3057,6 +3114,7 @@ public abstract class LivingEntity extends Entity implements Attackable { float f = (float)(d * 10.0 - 3.0); if (f > 0.0F) { this.playSound(this.getFallDamageSound((int)f), 1.0F, 1.0F); @@ -156,16 +163,16 @@ this.hurt(this.damageSources().flyIntoWall(), f); } } -@@ -4451,6 +_,12 @@ - ? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND) +@@ -4452,6 +4510,12 @@ public abstract class LivingEntity extends Entity implements Attackable { : 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/sources/net/minecraft/world/entity/Mob.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Mob.java.patch index 453f49b1b..43c9dff1b 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Mob.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Mob.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java +index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..e3b804f2d612ed7971db450aeea6768109b63470 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -136,6 +_,7 @@ +@@ -136,6 +136,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab private BlockPos restrictCenter = BlockPos.ZERO; private float restrictRadius = -1.0F; public boolean aware = true; // CraftBukkit @@ -8,7 +16,7 @@ protected Mob(EntityType entityType, Level level) { super(entityType, level); -@@ -281,6 +_,7 @@ +@@ -281,6 +282,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab target = null; } } @@ -16,14 +24,13 @@ this.target = target; return true; // CraftBukkit end -@@ -324,7 +_,27 @@ +@@ -324,8 +326,28 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } profilerFiller.pop(); -- } + incrementTicksSinceLastInteraction(); // Purpur - Entity lifespan -+ } -+ + } + + // Purpur start - Entity lifespan + private void incrementTicksSinceLastInteraction() { + ++this.ticksSinceLastInteraction; @@ -42,10 +49,11 @@ + } + } + // Purpur end - Entity lifespan - ++ @Override protected void playHurtSound(DamageSource source) { -@@ -420,6 +_,7 @@ + this.resetAmbientSoundTime(); +@@ -420,6 +442,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab compound.putBoolean("NoAI", this.isNoAi()); } compound.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit @@ -53,7 +61,7 @@ } @Override -@@ -443,6 +_,7 @@ +@@ -443,6 +466,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab this.lootTableSeed = compound.getLongOr("DeathLootTableSeed", 0L); this.setNoAi(compound.getBooleanOr("NoAI", false)); this.aware = compound.getBooleanOr("Bukkit.Aware", true); // CraftBukkit @@ -61,7 +69,7 @@ } @Override -@@ -1167,7 +_,7 @@ +@@ -1167,7 +1191,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab ); } @@ -70,7 +78,7 @@ return spawnGroupData; } -@@ -1499,6 +_,7 @@ +@@ -1499,6 +1523,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab this.playAttackSound(); } 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 index 4cd99d012..a84245ab6 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 a87accd5fe14102e7a2938f991a8ed0b9accd1bb..c7515f7f24e39d6931dcf18574cb47d754983903 100644 --- a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java +++ b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java -@@ -29,6 +_,7 @@ +@@ -29,6 +29,7 @@ public class RangedAttribute extends Attribute { @Override public double sanitizeValue(double value) { diff --git a/purpur-server/minecraft-patches/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 index c457ae742..8c83db8ec 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 b9174ae7e3a3e2de2d570b95ab5012ac3c3a2eda..67cbf9f5760fae5db6f31e64095cd1b6be6ade8e 100644 --- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -@@ -86,7 +_,7 @@ +@@ -86,7 +86,7 @@ public class AcquirePoi { }; // Paper start - optimise POI access final java.util.List, BlockPos>> poiposes = new java.util.ArrayList<>(); diff --git a/purpur-server/minecraft-patches/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 index f90e63ebd..1b5e18b00 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -55,7 +55,7 @@ public class InteractWithDoor { Node nextNode = path.getNextNode(); BlockPos blockPos = previousNode.asBlockPos(); BlockState blockState = level.getBlockState(blockPos); @@ -9,7 +17,7 @@ DoorBlock doorBlock = (DoorBlock)blockState.getBlock(); if (!doorBlock.isOpen(blockState)) { // CraftBukkit start - entities opening doors -@@ -72,7 +_,7 @@ +@@ -72,7 +72,7 @@ public class InteractWithDoor { BlockPos blockPos1 = nextNode.asBlockPos(); BlockState blockState1 = level.getBlockState(blockPos1); @@ -18,7 +26,7 @@ DoorBlock doorBlock1 = (DoorBlock)blockState1.getBlock(); if (!doorBlock1.isOpen(blockState1)) { // CraftBukkit start - entities opening doors -@@ -118,7 +_,7 @@ +@@ -118,7 +118,7 @@ public class InteractWithDoor { iterator.remove(); } else { BlockState blockState = level.getBlockState(blockPos); diff --git a/purpur-server/minecraft-patches/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 index 2bbc2776e..b41af4c20 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -46,6 +46,7 @@ public class ShowTradesToPlayer extends Behavior { @Override public boolean canStillUse(ServerLevel level, Villager entity, long gameTime) { diff --git a/purpur-server/minecraft-patches/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 index 6fbb7bf98..9a3c9b872 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -22,6 +22,7 @@ public class LlamaFollowCaravanGoal extends Goal { @Override public boolean canUse() { @@ -8,7 +16,7 @@ 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 +_,7 @@ +@@ -71,6 +72,7 @@ public class LlamaFollowCaravanGoal extends Goal { @Override public boolean canContinueToUse() { diff --git a/purpur-server/minecraft-patches/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 index f623c03a9..6ff6bb7c6 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,9 @@ +@@ -116,9 +116,9 @@ public class RangedBowAttackGoal extends Go } this.mob.lookAt(target, 30.0F, 30.0F); diff --git a/purpur-server/minecraft-patches/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 index cb39bb4e0..90f79d9f5 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 878d7813b3f2f52bef336c6d855d738bc2f83491..d0f94f065d2ecf6ca6b47ac49422ffa656a18f55 100644 --- a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java +++ b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java -@@ -58,7 +_,7 @@ +@@ -58,7 +58,7 @@ public class RunAroundLikeCrazyGoal extends Goal { if (firstPassenger instanceof Player player) { int temper = this.horse.getTemper(); int maxTemper = this.horse.getMaxTemper(); diff --git a/purpur-server/minecraft-patches/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 index b072c14f4..6cf8696b3 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,14 @@ +@@ -55,6 +55,14 @@ public class SwellGoal extends Goal { this.creeper.setSwellDir(-1); } else { this.creeper.setSwellDir(1); diff --git a/purpur-server/minecraft-patches/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 index 7e2366a32..99bb8d0d2 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -56,7 +56,7 @@ public class NearestBedSensor extends Sensor { // 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/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 index df5fd519b..b25734824 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 2f8920d8ee765d057a22d76f24f7d7dc1b0b17ca..6f0fcaeaba2fec2ad944d63550f0c3e29bd9133c 100644 --- a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java +++ b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java -@@ -64,6 +_,10 @@ +@@ -64,6 +64,10 @@ public class TargetingConditions { return false; } else if (this.selector != null && !this.selector.test(target, level)) { return false; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ambient/Bat.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ambient/Bat.java.patch index 7c4eddca7..dd38c623c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ambient/Bat.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/ambient/Bat.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java +index eb9fb57440f498079182030a46034008d3f6b5e8..ed8920bb6d29ce49626bc716aa2c2ce938f6d92b 100644 --- a/net/minecraft/world/entity/ambient/Bat.java +++ b/net/minecraft/world/entity/ambient/Bat.java -@@ -232,7 +_,7 @@ +@@ -232,7 +232,7 @@ public class Bat extends AmbientCreature { } else { int maxLocalRawBrightness = level.getMaxLocalRawBrightness(pos); int i = 4; @@ -9,7 +17,7 @@ i = 7; } else if (randomSource.nextBoolean()) { return false; -@@ -244,6 +_,11 @@ +@@ -244,6 +244,11 @@ public class Bat extends AmbientCreature { } } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/AbstractCow.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/AbstractCow.java.patch index 3c0826a05..3aefa55a5 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/AbstractCow.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/AbstractCow.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/AbstractCow.java b/net/minecraft/world/entity/animal/AbstractCow.java +index dd8ea03ba823996a5c97562e357650ab34d0e32e..4e81bc7215c845b316bcd46ce29f49af7f986088 100644 --- a/net/minecraft/world/entity/animal/AbstractCow.java +++ b/net/minecraft/world/entity/animal/AbstractCow.java -@@ -39,7 +_,7 @@ +@@ -39,7 +39,7 @@ public abstract class AbstractCow extends Animal { 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)); @@ -9,7 +17,7 @@ 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 +_,10 @@ +@@ -95,6 +95,10 @@ public abstract class AbstractCow extends Animal { ItemStack itemStack = ItemUtils.createFilledResult(itemInHand, player, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit player.setItemInHand(hand, itemStack); return InteractionResult.SUCCESS; @@ -20,7 +28,7 @@ } else { return super.mobInteract(player, hand); } -@@ -104,4 +_,67 @@ +@@ -104,4 +108,67 @@ public abstract class AbstractCow extends Animal { public EntityDimensions getDefaultDimensions(Pose pose) { return this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Animal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Animal.java.patch index 0f2339b09..fb812bb2c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Animal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Animal.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Animal.java b/net/minecraft/world/entity/animal/Animal.java +index b851f94d63a049292a3657009d68bc1641222104..2ce0099460c14a6dd8b128f268ee915ea4be5183 100644 --- a/net/minecraft/world/entity/animal/Animal.java +++ b/net/minecraft/world/entity/animal/Animal.java -@@ -142,7 +_,7 @@ +@@ -142,7 +142,7 @@ public abstract class Animal extends AgeableMob { ItemStack itemInHand = player.getItemInHand(hand); if (this.isFood(itemInHand)) { int age = this.getAge(); @@ -9,7 +17,7 @@ final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying this.usePlayerItem(player, hand, itemInHand); this.setInLove(player, breedCopy); // Paper - Fix EntityBreedEvent copying -@@ -239,10 +_,20 @@ +@@ -239,10 +239,20 @@ public abstract class Animal extends AgeableMob { public void spawnChildFromBreeding(ServerLevel level, Animal mate) { AgeableMob breedOffspring = this.getBreedOffspring(level, mate); if (breedOffspring != null) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Bee.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Bee.java.patch index dc2f1ba02..4166696de 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Bee.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Bee.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java +index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..585131365c40136cf8a8a715b077982091ee38d5 100644 --- a/net/minecraft/world/entity/animal/Bee.java +++ b/net/minecraft/world/entity/animal/Bee.java -@@ -167,7 +_,7 @@ +@@ -167,7 +167,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { // Paper end - Fix MC-167279 this.lookControl = new Bee.BeeLookControl(this); this.setPathfindingMalus(PathType.DANGER_FIRE, -1.0F); @@ -9,7 +17,7 @@ this.setPathfindingMalus(PathType.WATER_BORDER, 16.0F); this.setPathfindingMalus(PathType.COCOA, -1.0F); this.setPathfindingMalus(PathType.FENCE, -1.0F); -@@ -365,7 +_,7 @@ +@@ -365,7 +365,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } public static boolean isNightOrRaining(Level level) { @@ -18,7 +26,7 @@ } public void setStayOutOfHiveCountdown(int stayOutOfHiveCountdown) { -@@ -388,7 +_,7 @@ +@@ -388,7 +388,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @Override protected void customServerAiStep(ServerLevel level) { boolean hasStung = this.hasStung(); @@ -27,7 +35,7 @@ this.underWaterTicks++; } else { this.underWaterTicks = 0; -@@ -398,6 +_,7 @@ +@@ -398,6 +398,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.hurtServer(level, this.damageSources().drown(), 1.0F); } @@ -35,7 +43,7 @@ if (hasStung) { this.timeSinceSting++; if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) { -@@ -1135,6 +_,7 @@ +@@ -1135,6 +1136,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { 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); @@ -43,7 +51,7 @@ return true; } else { Bee.this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(Bee.this.random, 20, 60); -@@ -1181,6 +_,7 @@ +@@ -1181,6 +1183,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.pollinating = false; Bee.this.navigation.stop(); Bee.this.remainingCooldownBeforeLocatingNewFlower = 200; @@ -51,7 +59,7 @@ } @Override -@@ -1227,6 +_,7 @@ +@@ -1227,6 +1230,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.setWantedPos(); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Cat.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Cat.java.patch index 5bbb90ab9..da9463a34 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Cat.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Cat.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java +index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..7894db23663c4647742f543195b610bd7e1f3360 100644 --- a/net/minecraft/world/entity/animal/Cat.java +++ b/net/minecraft/world/entity/animal/Cat.java -@@ -353,6 +_,14 @@ +@@ -353,6 +353,14 @@ public class Cat extends TamableAnimal { return this.isTame() && otherAnimal instanceof Cat cat && cat.isTame() && super.canMate(otherAnimal); } @@ -15,7 +23,7 @@ @Nullable @Override public SpawnGroupData finalizeSpawn( -@@ -451,7 +_,7 @@ +@@ -451,7 +459,7 @@ public class Cat extends TamableAnimal { } private void tryToTame(Player player) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Dolphin.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Dolphin.java.patch index f5d03cb8f..8883d198f 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Dolphin.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Dolphin.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Dolphin.java b/net/minecraft/world/entity/animal/Dolphin.java +index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..bca2e4659f4afdd7106f77e32af1943e4d276f5e 100644 --- a/net/minecraft/world/entity/animal/Dolphin.java +++ b/net/minecraft/world/entity/animal/Dolphin.java -@@ -73,6 +_,7 @@ +@@ -73,6 +73,7 @@ public class Dolphin extends AgeableWaterCreature { private static final boolean DEFAULT_GOT_FISH = false; @Nullable public BlockPos treasurePos; @@ -8,7 +16,7 @@ public Dolphin(EntityType entityType, Level level) { super(entityType, level); -@@ -89,6 +_,7 @@ +@@ -89,6 +90,7 @@ public class Dolphin extends AgeableWaterCreature { this.setAirSupply(this.getMaxAirSupply()); this.setXRot(0.0F); SpawnGroupData spawnGroupData1 = Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.1F)); @@ -16,7 +24,7 @@ return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData1); } -@@ -155,17 +_,19 @@ +@@ -155,17 +157,19 @@ public class Dolphin extends AgeableWaterCreature { protected void registerGoals() { this.goalSelector.addGoal(0, new BreathAirGoal(this)); this.goalSelector.addGoal(0, new TryFindWaterGoal(this)); @@ -37,7 +45,7 @@ } public static AttributeSupplier.Builder createAttributes() { -@@ -398,6 +_,7 @@ +@@ -398,6 +402,7 @@ public class Dolphin extends AgeableWaterCreature { @Override public boolean canUse() { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Fox.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Fox.java.patch index 283e94dc0..097b3cbc0 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Fox.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Fox.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java +index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..4aae42396bd3abb131efe336d7b774384897671d 100644 --- a/net/minecraft/world/entity/animal/Fox.java +++ b/net/minecraft/world/entity/animal/Fox.java -@@ -345,6 +_,11 @@ +@@ -345,6 +345,11 @@ public class Fox extends Animal { } private void setTargetGoals() { @@ -12,7 +20,7 @@ if (this.getVariant() == Fox.Variant.RED) { this.targetSelector.addGoal(4, this.landTargetGoal); this.targetSelector.addGoal(4, this.turtleEggTargetGoal); -@@ -372,6 +_,7 @@ +@@ -372,6 +377,7 @@ public class Fox extends Animal { public void setVariant(Fox.Variant variant) { this.entityData.set(DATA_TYPE_ID, variant.getId()); @@ -20,11 +28,10 @@ } @Nullable -@@ -705,6 +_,29 @@ - return slot == EquipmentSlot.MAINHAND; +@@ -706,6 +712,29 @@ public class Fox extends Animal { } // Paper end -+ + + // Purpur start - Tulips change fox type + @Override + public net.minecraft.world.InteractionResult mobInteract(Player player, net.minecraft.world.InteractionHand hand) { @@ -47,6 +54,7 @@ + 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/sources/net/minecraft/world/entity/animal/IronGolem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/IronGolem.java.patch index bf5dd4962..58c04a8cf 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/IronGolem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/IronGolem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/IronGolem.java b/net/minecraft/world/entity/animal/IronGolem.java +index 33245f28c02c5cd42f2daec8748d615b7f5e21ec..91897447d7ef35af3300443e8eb96340081fed48 100644 --- a/net/minecraft/world/entity/animal/IronGolem.java +++ b/net/minecraft/world/entity/animal/IronGolem.java -@@ -57,13 +_,26 @@ +@@ -57,13 +57,26 @@ public class IronGolem extends AbstractGolem implements NeutralMob { private int remainingPersistentAngerTime; @Nullable private UUID persistentAngerTarget; @@ -27,7 +35,7 @@ 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)); -@@ -141,6 +_,7 @@ +@@ -141,6 +154,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { public void addAdditionalSaveData(CompoundTag compound) { super.addAdditionalSaveData(compound); compound.putBoolean("PlayerCreated", this.isPlayerCreated()); @@ -35,7 +43,7 @@ this.addPersistentAngerSaveData(compound); } -@@ -148,6 +_,7 @@ +@@ -148,6 +162,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { public void readAdditionalSaveData(CompoundTag compound) { super.readAdditionalSaveData(compound); this.setPlayerCreated(compound.getBooleanOr("PlayerCreated", false)); @@ -43,7 +51,7 @@ this.readPersistentAngerSaveData(this.level(), compound); } -@@ -267,6 +_,7 @@ +@@ -267,6 +282,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { 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/sources/net/minecraft/world/entity/animal/MushroomCow.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/MushroomCow.java.patch index 48673480a..4d479f9f3 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/MushroomCow.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/MushroomCow.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/MushroomCow.java b/net/minecraft/world/entity/animal/MushroomCow.java +index cc2fd681d2383e62191e7b380322f2e176d79f1e..0931bab3f52ccc4e405be22559323df90bcc065e 100644 --- a/net/minecraft/world/entity/animal/MushroomCow.java +++ b/net/minecraft/world/entity/animal/MushroomCow.java -@@ -198,6 +_,13 @@ +@@ -198,6 +198,13 @@ public class MushroomCow extends AbstractCow implements Shearable { level.playSound(null, this, SoundEvents.MOOSHROOM_SHEAR, soundSource, 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/sources/net/minecraft/world/entity/animal/Ocelot.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Ocelot.java.patch index c54cc0da1..79d558b0d 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Ocelot.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Ocelot.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Ocelot.java b/net/minecraft/world/entity/animal/Ocelot.java +index 9e86a42f04d06c3dcd241f16ab876b0c8422fd81..48c8fdfea8687f37187b6092c285275c12963ea0 100644 --- a/net/minecraft/world/entity/animal/Ocelot.java +++ b/net/minecraft/world/entity/animal/Ocelot.java -@@ -233,7 +_,7 @@ +@@ -233,7 +233,7 @@ public class Ocelot extends Animal { public boolean checkSpawnObstruction(LevelReader level) { if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) { BlockPos blockPos = this.blockPosition(); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Parrot.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Parrot.java.patch index 4425b62cb..9bed65478 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Parrot.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Parrot.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Parrot.java b/net/minecraft/world/entity/animal/Parrot.java +index cff10bb74a216238288280399910ab1fa85cb1a5..ca661c215d2eb719392a30c7b917bd622524c4dc 100644 --- a/net/minecraft/world/entity/animal/Parrot.java +++ b/net/minecraft/world/entity/animal/Parrot.java -@@ -157,6 +_,7 @@ +@@ -157,6 +157,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { protected void registerGoals() { this.goalSelector.addGoal(0, new TamableAnimal.TamableAnimalPanicGoal(1.25)); this.goalSelector.addGoal(0, new FloatGoal(this)); @@ -8,7 +16,7 @@ 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)); -@@ -262,7 +_,7 @@ +@@ -262,7 +263,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { } if (!this.level().isClientSide) { @@ -17,7 +25,7 @@ this.tame(player); this.level().broadcastEntityEvent(this, (byte)7); } else { -@@ -270,6 +_,7 @@ +@@ -270,6 +271,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { } } @@ -25,7 +33,7 @@ return InteractionResult.SUCCESS; } else if (!itemInHand.is(ItemTags.PARROT_POISONOUS_FOOD)) { if (!this.isFlying() && this.isTame() && this.isOwnedBy(player)) { -@@ -294,7 +_,7 @@ +@@ -294,7 +296,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { @Override public boolean isFood(ItemStack stack) { @@ -34,7 +42,7 @@ } public static boolean checkParrotSpawnRules( -@@ -309,13 +_,13 @@ +@@ -309,13 +311,13 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { @Override public boolean canMate(Animal otherAnimal) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Pig.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Pig.java.patch index c1deac0d5..21f677d5b 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Pig.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Pig.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Pig.java b/net/minecraft/world/entity/animal/Pig.java +index ec2074741b52cf8f1ac3c0276bcfc9b8806b71bf..027d47b89d306bf6bc3d5457a163041f6aa7ab49 100644 --- a/net/minecraft/world/entity/animal/Pig.java +++ b/net/minecraft/world/entity/animal/Pig.java -@@ -141,6 +_,19 @@ +@@ -141,6 +141,19 @@ public class Pig extends Animal implements ItemSteerable { @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { boolean isFood = this.isFood(player.getItemInHand(hand)); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/PolarBear.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/PolarBear.java.patch index 775a03fbe..66d2543dc 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/PolarBear.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/PolarBear.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/PolarBear.java b/net/minecraft/world/entity/animal/PolarBear.java +index fcdaaed31c38acb55e66599cd3314606d223cd67..d018b1a967557cfae0d3227d8f43d281a78a22bc 100644 --- a/net/minecraft/world/entity/animal/PolarBear.java +++ b/net/minecraft/world/entity/animal/PolarBear.java -@@ -64,6 +_,29 @@ +@@ -64,6 +64,29 @@ public class PolarBear extends Animal implements NeutralMob { super(entityType, level); } @@ -30,7 +38,7 @@ @Nullable @Override public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob otherParent) { -@@ -72,7 +_,7 @@ +@@ -72,7 +95,7 @@ public class PolarBear extends Animal implements NeutralMob { @Override public boolean isFood(ItemStack stack) { @@ -39,7 +47,7 @@ } @Override -@@ -81,6 +_,12 @@ +@@ -81,6 +104,12 @@ public class PolarBear extends Animal implements NeutralMob { 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/sources/net/minecraft/world/entity/animal/Rabbit.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch index 930cde3c7..ff258a8c6 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java +index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..e9445749c5264bd0ce7c426845cb342d34dea713 100644 --- a/net/minecraft/world/entity/animal/Rabbit.java +++ b/net/minecraft/world/entity/animal/Rabbit.java -@@ -403,10 +_,23 @@ +@@ -403,10 +403,23 @@ public class Rabbit extends Animal { } this.setVariant(randomRabbitVariant); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/SnowGolem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/SnowGolem.java.patch index b73653343..e68bbcdb2 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/SnowGolem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/SnowGolem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/SnowGolem.java b/net/minecraft/world/entity/animal/SnowGolem.java +index 7d73f02efb37aeafe41c23325a02d641d57bdaf4..67c8f1e82c775818f906eeaa639e55d7c02834c6 100644 --- a/net/minecraft/world/entity/animal/SnowGolem.java +++ b/net/minecraft/world/entity/animal/SnowGolem.java -@@ -45,15 +_,27 @@ +@@ -45,15 +45,27 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM 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; @@ -30,7 +38,7 @@ 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)); -@@ -73,12 +_,14 @@ +@@ -73,12 +85,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM public void addAdditionalSaveData(CompoundTag compound) { super.addAdditionalSaveData(compound); compound.putBoolean("Pumpkin", this.hasPumpkin()); @@ -45,7 +53,7 @@ } @Override -@@ -152,6 +_,14 @@ +@@ -152,6 +166,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM } return InteractionResult.SUCCESS; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Squid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Squid.java.patch index 83c0aed86..976811185 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Squid.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Squid.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/Squid.java b/net/minecraft/world/entity/animal/Squid.java +index 58e1bc90cbc32669fa6c66d214119f0c459ff38c..2e51e64991d326fc055520b6fefc76e80f7c2d97 100644 --- a/net/minecraft/world/entity/animal/Squid.java +++ b/net/minecraft/world/entity/animal/Squid.java -@@ -46,10 +_,29 @@ +@@ -46,10 +46,29 @@ public class Squid extends AgeableWaterCreature { public Squid(EntityType entityType, Level level) { super(entityType, level); @@ -31,7 +39,7 @@ @Override protected void registerGoals() { this.goalSelector.addGoal(0, new Squid.SquidRandomMovementGoal(this)); -@@ -127,6 +_,7 @@ +@@ -127,6 +146,7 @@ public class Squid extends AgeableWaterCreature { } if (this.isInWater()) { @@ -39,7 +47,7 @@ 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; -@@ -308,7 +_,7 @@ +@@ -308,7 +328,7 @@ public class Squid extends AgeableWaterCreature { int noActionTime = this.squid.getNoActionTime(); if (noActionTime > 100) { this.squid.movementVector = Vec3.ZERO; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch index 3552d2bfc..fd45109aa 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/animal/WaterAnimal.java b/net/minecraft/world/entity/animal/WaterAnimal.java +index 2b5e091b6ebe17e30d8d0e73999e19eed49e9a9f..6ff9ca735eba1c3376f3bc4916d5ab76af782de1 100644 --- a/net/minecraft/world/entity/animal/WaterAnimal.java +++ b/net/minecraft/world/entity/animal/WaterAnimal.java -@@ -76,8 +_,7 @@ +@@ -76,8 +76,7 @@ public abstract class WaterAnimal extends PathfinderMob { 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/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 index 4cd0aeca3..80b14be45 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 b22321ead9d66cb089b67276743624b3cca52fc1..c399192687e01bd4a05e4a85d71493d4c3c3e9a8 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java -@@ -395,6 +_,7 @@ +@@ -395,6 +395,7 @@ public class Goat extends Animal { // Paper start - Goat ram API public void ram(net.minecraft.world.entity.LivingEntity entity) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/horse/Llama.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/horse/Llama.java.patch index ccbc13a99..795e98415 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/horse/Llama.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/animal/horse/Llama.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 6916adb865ff8fea498d3a61c2b5560472a223f4..d4467235e8dc9d10c61dfb6fd9dc32386903dd09 100644 --- a/net/minecraft/world/entity/animal/horse/Llama.java +++ b/net/minecraft/world/entity/animal/horse/Llama.java -@@ -77,6 +_,7 @@ +@@ -77,6 +77,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { private Llama caravanHead; @Nullable public Llama caravanTail; // Paper @@ -8,7 +16,7 @@ public Llama(EntityType entityType, Level level) { super(entityType, level); -@@ -111,6 +_,7 @@ +@@ -111,6 +112,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { super.addAdditionalSaveData(compound); compound.store("Variant", Llama.Variant.LEGACY_CODEC, this.getVariant()); compound.putInt("Strength", this.getStrength()); @@ -16,7 +24,7 @@ } @Override -@@ -118,6 +_,7 @@ +@@ -118,6 +120,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { this.setStrength(compound.getIntOr("Strength", 0)); super.readAdditionalSaveData(compound); this.setVariant(compound.read("Variant", Llama.Variant.LEGACY_CODEC).orElse(Llama.Variant.DEFAULT)); @@ -24,7 +32,7 @@ } @Override -@@ -399,6 +_,7 @@ +@@ -399,6 +402,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { public void leaveCaravan() { if (this.caravanHead != null) { @@ -32,7 +40,7 @@ this.caravanHead.caravanTail = null; } -@@ -406,6 +_,7 @@ +@@ -406,6 +410,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { } public void joinCaravan(Llama caravanHead) { diff --git a/purpur-server/minecraft-patches/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 index 004641e75..de4d32c26 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 d926ecd041ca2a421057bc22efe66a8b811ee649..0487c463806509b1dd93dcfee3b518c95b0bdb19 100644 --- a/net/minecraft/world/entity/animal/wolf/Wolf.java +++ b/net/minecraft/world/entity/animal/wolf/Wolf.java -@@ -100,6 +_,37 @@ +@@ -100,6 +100,37 @@ public class Wolf extends TamableAnimal implements NeutralMob { EntityType type = entity.getType(); return type == EntityType.SHEEP || type == EntityType.RABBIT || type == EntityType.FOX; }; @@ -38,7 +46,7 @@ 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 +_,47 @@ +@@ -122,12 +153,47 @@ public class Wolf extends TamableAnimal implements NeutralMob { this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F); } @@ -86,7 +94,7 @@ 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 +_,7 @@ +@@ -140,7 +206,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { 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)); @@ -95,7 +103,7 @@ 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 +_,7 @@ +@@ -231,6 +297,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { public void addAdditionalSaveData(CompoundTag compound) { super.addAdditionalSaveData(compound); compound.store("CollarColor", DyeColor.LEGACY_ID_CODEC, this.getCollarColor()); @@ -103,7 +111,7 @@ VariantUtils.writeVariant(compound, this.getVariant()); this.addPersistentAngerSaveData(compound); this.getSoundVariant() -@@ -245,6 +_,10 @@ +@@ -245,6 +312,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { super.readAdditionalSaveData(compound); VariantUtils.readVariant(compound, this.registryAccess(), Registries.WOLF_VARIANT).ifPresent(this::setVariant); this.setCollarColor(compound.read("CollarColor", DyeColor.LEGACY_ID_CODEC).orElse(DEFAULT_COLLAR_COLOR)); @@ -114,7 +122,7 @@ this.readPersistentAngerSaveData(this.level(), compound); compound.read("sound_variant", ResourceKey.codec(Registries.WOLF_SOUND_VARIANT)) .flatMap(resourceKey -> this.registryAccess().lookupOrThrow(Registries.WOLF_SOUND_VARIANT).get((ResourceKey)resourceKey)) -@@ -269,6 +_,10 @@ +@@ -269,6 +340,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { } this.setSoundVariant(WolfSoundVariants.pickRandomSoundVariant(this.registryAccess(), this.random)); @@ -125,7 +133,7 @@ return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } -@@ -319,6 +_,11 @@ +@@ -319,6 +394,11 @@ public class Wolf extends TamableAnimal implements NeutralMob { public void tick() { super.tick(); if (this.isAlive()) { @@ -137,7 +145,7 @@ this.interestedAngleO = this.interestedAngle; if (this.isInterested()) { this.interestedAngle = this.interestedAngle + (1.0F - this.interestedAngle) * 0.4F; -@@ -532,13 +_,27 @@ +@@ -532,13 +612,27 @@ public class Wolf extends TamableAnimal implements NeutralMob { itemInHand.consume(1, player); this.tryToTame(player); return InteractionResult.SUCCESS_SERVER; diff --git a/purpur-server/minecraft-patches/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 index 607381a02..76ebb6724 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 d813427cf20117014bc42af0eb7cdee037fbcd9c..57f9f705c62706902efe9a7873f0e3866820f7d9 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java +++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java -@@ -38,6 +_,24 @@ +@@ -38,6 +38,24 @@ public class EndCrystal extends Entity { this.setPos(x, y, z); } @@ -25,7 +33,7 @@ @Override protected Entity.MovementEmission getMovementEmission() { return Entity.MovementEmission.NONE; -@@ -74,6 +_,8 @@ +@@ -74,6 +92,8 @@ public class EndCrystal extends Entity { } } // Paper end - Fix invulnerable end crystals @@ -34,7 +42,7 @@ } @Override -@@ -114,15 +_,17 @@ +@@ -114,15 +134,17 @@ public class EndCrystal extends Entity { } // CraftBukkit end if (!damageSource.is(DamageTypeTags.IS_EXPLOSION)) { diff --git a/purpur-server/minecraft-patches/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 index 6a075e024..416ca4306 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..ea9d27a3205b3699b9577f42bb04254bd76e700e 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -960,6 +_,7 @@ +@@ -960,6 +960,7 @@ public class EnderDragon extends Mob implements Enemy { @Override protected boolean canRide(Entity entity) { @@ -8,7 +16,7 @@ return false; } -@@ -995,7 +_,7 @@ +@@ -995,7 +996,7 @@ public class EnderDragon extends Mob implements Enemy { boolean flag = level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT); int i = 500; diff --git a/purpur-server/minecraft-patches/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 index a38519604..81de8a88e 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 09924cccf9208abda22cc7e1635b567ed166e95a..2f7da367b58fd9c06c4e012e8eb7f59e5a7f9b6d 100644 --- a/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -78,6 +_,7 @@ +@@ -78,6 +78,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { 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); @@ -8,7 +16,7 @@ public WitherBoss(EntityType entityType, Level level) { super(entityType, level); -@@ -86,6 +_,17 @@ +@@ -86,6 +87,17 @@ public class WitherBoss extends Monster implements RangedAttackMob { this.xpReward = 50; } @@ -26,7 +34,7 @@ @Override protected PathNavigation createNavigation(Level level) { FlyingPathNavigation flyingPathNavigation = new FlyingPathNavigation(this, level); -@@ -118,6 +_,7 @@ +@@ -118,6 +130,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { public void addAdditionalSaveData(CompoundTag compound) { super.addAdditionalSaveData(compound); compound.putInt("Invul", this.getInvulnerableTicks()); @@ -34,7 +42,7 @@ } @Override -@@ -127,6 +_,7 @@ +@@ -127,6 +140,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { if (this.hasCustomName()) { this.bossEvent.setName(this.getDisplayName()); } @@ -42,7 +50,7 @@ } @Override -@@ -270,7 +_,7 @@ +@@ -270,7 +284,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); } // CraftBukkit end @@ -51,7 +59,7 @@ // CraftBukkit start - Use relative location for far away sounds // level.globalLevelEvent(1023, this.blockPosition(), 0); int viewDistance = level.getCraftServer().getViewDistance() * 16; -@@ -377,8 +_,10 @@ +@@ -377,8 +391,10 @@ public class WitherBoss extends Monster implements RangedAttackMob { } } @@ -64,7 +72,7 @@ } this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth()); -@@ -575,6 +_,7 @@ +@@ -575,6 +591,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { @Override protected boolean canRide(Entity entity) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch index 1974dd8b7..6adeae079 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java +index 5248f3c22abb608d7d7b338f169f13bfbf4cd2d6..fa20c642c05fa4ed3739cd0b3964e31fd4dba1d3 100644 --- a/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -95,10 +_,13 @@ +@@ -95,10 +95,13 @@ public class ArmorStand extends LivingEntity { private boolean noTickPoseDirty = false; private boolean noTickEquipmentDirty = false; // Paper end - Allow ArmorStands not to tick @@ -14,7 +22,7 @@ } public ArmorStand(Level level, double x, double y, double z) { -@@ -546,6 +_,7 @@ +@@ -546,6 +549,7 @@ public class ArmorStand extends LivingEntity { @Override public void tick() { @@ -22,7 +30,7 @@ // Paper start - Allow ArmorStands not to tick if (!this.canTick) { if (this.noTickPoseDirty) { -@@ -875,4 +_,18 @@ +@@ -875,4 +879,18 @@ public class ArmorStand extends LivingEntity { } } // Paper end diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch index 5f326c938..da28ecc18 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java +index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..4ddf1cdf7a47bf06f95c5bfce8f3c4d035e87cfc 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -59,6 +_,12 @@ +@@ -59,6 +59,12 @@ public class ItemEntity extends Entity implements TraceableEntity { 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 @@ -13,7 +21,7 @@ public ItemEntity(EntityType entityType, Level level) { super(entityType, level); -@@ -344,7 +_,16 @@ +@@ -344,7 +350,16 @@ public class ItemEntity extends Entity implements TraceableEntity { @Override public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { @@ -31,7 +39,7 @@ return false; } else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { return false; -@@ -528,6 +_,12 @@ +@@ -528,6 +543,12 @@ public class ItemEntity extends Entity implements TraceableEntity { 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/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch index 052ef78b6..074711b8c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java +index 5d23d8754b304d5e2fd54400cc81c7fe5c14a804..9a00aead39e194de076ee651d2f75b29673cad1e 100644 --- a/net/minecraft/world/entity/item/PrimedTnt.java +++ b/net/minecraft/world/entity/item/PrimedTnt.java -@@ -253,4 +_,32 @@ +@@ -253,4 +253,32 @@ public class PrimedTnt extends Entity implements TraceableEntity { 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/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch index af806331a..91ff004c1 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/AbstractSkeleton.java b/net/minecraft/world/entity/monster/AbstractSkeleton.java +index 22d5ccb271fc19255e99afa5d1ff10549a20dc31..025b74f7fe2094110a9fd293911588f361785d0a 100644 --- a/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java -@@ -158,10 +_,7 @@ +@@ -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()) { @@ -12,7 +20,7 @@ this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); this.setDropChance(EquipmentSlot.HEAD, 0.0F); } -@@ -217,7 +_,7 @@ +@@ -217,7 +214,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo if (event.getProjectile() == arrow.getBukkitEntity()) { // CraftBukkit end Projectile.spawnProjectileUsingShoot( diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch index 803176349..e9112d5b3 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java +index 3f5e1e98802e5dd1cfc9075559e1102046605a04..c2327306f093c834da9574f9466236fbec572aec 100644 --- a/net/minecraft/world/entity/monster/Creeper.java +++ b/net/minecraft/world/entity/monster/Creeper.java -@@ -54,6 +_,7 @@ +@@ -54,6 +54,7 @@ public class Creeper extends Monster { public int explosionRadius = 3; private int droppedSkulls; public @Nullable Entity entityIgniter; // CraftBukkit @@ -8,7 +16,7 @@ public Creeper(EntityType entityType, Level level) { super(entityType, level); -@@ -157,6 +_,27 @@ +@@ -157,6 +158,27 @@ public class Creeper extends Monster { return false; // CraftBukkit } @@ -36,7 +44,7 @@ @Override public SoundEvent getHurtSound(DamageSource damageSource) { return SoundEvents.CREEPER_HURT; -@@ -239,14 +_,16 @@ +@@ -239,14 +261,16 @@ public class Creeper extends Monster { } public void explodeCreeper() { @@ -55,7 +63,7 @@ this.spawnLingeringCloud(); this.triggerOnDeathMobEffects(serverLevel, Entity.RemovalReason.KILLED); this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause -@@ -257,6 +_,7 @@ +@@ -257,6 +281,7 @@ public class Creeper extends Monster { } // CraftBukkit end } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Drowned.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Drowned.java.patch index 3d8569ee4..28131613d 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Drowned.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Drowned.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java +index 4978cd2a7a84130fc0de1cc481b39d61f388c812..c0afb6f85cecf26bb1a08669ac3fcec8fea6cbfc 100644 --- a/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java -@@ -82,10 +_,23 @@ +@@ -82,10 +82,23 @@ public class Drowned extends Zombie implements RangedAttackMob { 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/sources/net/minecraft/world/entity/monster/EnderMan.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch index 0d9f0fc51..2d3bc3cbf 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java +index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..ed322ed572cac147acf26ba18a7803685557e0d7 100644 --- a/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java -@@ -103,7 +_,7 @@ +@@ -103,7 +103,7 @@ public class EnderMan extends Monster implements NeutralMob { 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)); @@ -9,7 +17,7 @@ this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false)); } -@@ -220,7 +_,7 @@ +@@ -220,7 +220,7 @@ public class EnderMan extends Monster implements NeutralMob { boolean isBeingStaredBy(Player player) { // Paper start - EndermanAttackPlayerEvent @@ -18,7 +26,7 @@ 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(); -@@ -376,6 +_,7 @@ +@@ -376,6 +376,7 @@ public class EnderMan extends Monster implements NeutralMob { public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isInvulnerableTo(level, damageSource)) { return false; @@ -26,7 +34,7 @@ } else { AbstractThrownPotion abstractThrownPotion1 = damageSource.getDirectEntity() instanceof AbstractThrownPotion abstractThrownPotion ? abstractThrownPotion -@@ -392,6 +_,7 @@ +@@ -392,6 +393,7 @@ public class EnderMan extends Monster implements NeutralMob { } else { boolean flag = abstractThrownPotion1 != null && this.hurtWithCleanWater(level, damageSource, abstractThrownPotion1, amount); @@ -34,7 +42,7 @@ if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent for (int i = 0; i < 64; i++) { if (this.teleport()) { -@@ -435,7 +_,7 @@ +@@ -435,7 +437,7 @@ public class EnderMan extends Monster implements NeutralMob { @Override public boolean requiresCustomPersistence() { @@ -43,7 +51,7 @@ } static class EndermanFreezeWhenLookedAt extends Goal { -@@ -479,6 +_,7 @@ +@@ -479,6 +481,7 @@ public class EnderMan extends Monster implements NeutralMob { @Override public boolean canUse() { @@ -51,7 +59,7 @@ return this.enderman.getCarriedBlock() != null && getServerLevel(this.enderman).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0; -@@ -628,6 +_,7 @@ +@@ -628,6 +631,7 @@ public class EnderMan extends Monster implements NeutralMob { @Override public boolean canUse() { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch index 60b09997d..34811f4db 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Endermite.java b/net/minecraft/world/entity/monster/Endermite.java +index 7fad96756972308e71fd38033f06148467a7aecd..37eaed1455f34011c24170ca0b05f606bd03fac0 100644 --- a/net/minecraft/world/entity/monster/Endermite.java +++ b/net/minecraft/world/entity/monster/Endermite.java -@@ -29,12 +_,23 @@ +@@ -29,12 +29,23 @@ public class Endermite extends Monster { private static final int MAX_LIFE = 2400; private static final int DEFAULT_LIFE = 0; public int life = 0; @@ -24,7 +32,7 @@ @Override protected void registerGoals() { this.goalSelector.addGoal(1, new FloatGoal(this)); -@@ -80,12 +_,14 @@ +@@ -80,12 +91,14 @@ public class Endermite extends Monster { public void readAdditionalSaveData(CompoundTag compound) { super.readAdditionalSaveData(compound); this.life = compound.getIntOr("Lifetime", 0); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Monster.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Monster.java.patch index c833d4fc6..b2a938b4b 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Monster.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Monster.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Monster.java b/net/minecraft/world/entity/monster/Monster.java +index 5ef9566b16a4d0300ee45a993c46e734db156416..04d5910d736dee2a88a2602f4a98495459277157 100644 --- a/net/minecraft/world/entity/monster/Monster.java +++ b/net/minecraft/world/entity/monster/Monster.java -@@ -88,6 +_,14 @@ +@@ -88,6 +88,14 @@ public abstract class Monster extends PathfinderMob implements Enemy { } public static boolean isDarkEnoughToSpawn(ServerLevelAccessor level, BlockPos pos, RandomSource random) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch index 0374fac35..d3674aef0 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java +index 483b0499f1f70b3aa8862e6cd8e512748492bee0..73edb1a4e5daee16fa518c05de24e413847ab65d 100644 --- a/net/minecraft/world/entity/monster/Phantom.java +++ b/net/minecraft/world/entity/monster/Phantom.java -@@ -159,7 +_,11 @@ +@@ -159,7 +159,11 @@ public class Phantom extends FlyingMob implements Enemy { ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { this.anchorPoint = this.blockPosition().above(5); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch index f593040b8..ac777878d 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Ravager.java b/net/minecraft/world/entity/monster/Ravager.java +index ca1856b18878b94ebfb566395e5eee13cf3c1cd5..85018a01b5d803a91228e2fa02717c2c518a3004 100644 --- a/net/minecraft/world/entity/monster/Ravager.java +++ b/net/minecraft/world/entity/monster/Ravager.java -@@ -73,6 +_,7 @@ +@@ -73,6 +73,7 @@ public class Ravager extends Raider { protected void registerGoals() { super.registerGoals(); this.goalSelector.addGoal(0, new FloatGoal(this)); @@ -8,7 +16,7 @@ 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)); -@@ -153,7 +_,7 @@ +@@ -153,7 +154,7 @@ public class Ravager extends Raider { )) { BlockState blockState = serverLevel.getBlockState(blockPos); Block block = blockState.getBlock(); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch index 5b9b6f4ed..20b9ec193 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Shulker.java b/net/minecraft/world/entity/monster/Shulker.java +index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..a8c5c2ad80afd03b3fc53127b519b5c2b73bff85 100644 --- a/net/minecraft/world/entity/monster/Shulker.java +++ b/net/minecraft/world/entity/monster/Shulker.java -@@ -53,6 +_,7 @@ +@@ -53,6 +53,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.ServerLevelAccessor; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; @@ -8,7 +16,7 @@ import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; -@@ -93,6 +_,21 @@ +@@ -93,6 +94,21 @@ public class Shulker extends AbstractGolem implements Enemy { this.lookControl = new Shulker.ShulkerLookControl(this); } @@ -30,7 +38,7 @@ @Override protected void registerGoals() { this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F, 0.02F, true)); -@@ -460,11 +_,21 @@ +@@ -460,11 +476,21 @@ public class Shulker extends AbstractGolem implements Enemy { private void hitByShulkerBullet() { Vec3 vec3 = this.position(); AABB boundingBox = this.getBoundingBox(); @@ -56,7 +64,7 @@ if (shulker != null) { shulker.setVariant(this.getVariant()); shulker.snapTo(vec3); -@@ -572,7 +_,7 @@ +@@ -572,7 +598,7 @@ public class Shulker extends AbstractGolem implements Enemy { } public Optional getVariant() { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Skeleton.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Skeleton.java.patch index 5530c24e5..f08858dd4 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Skeleton.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Skeleton.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Skeleton.java b/net/minecraft/world/entity/monster/Skeleton.java +index 48f26ed693b43e3f65f1559ba69b3d7249664f71..1f35105f6ddd33fc9558d19590a5696479d2de83 100644 --- a/net/minecraft/world/entity/monster/Skeleton.java +++ b/net/minecraft/world/entity/monster/Skeleton.java -@@ -139,4 +_,64 @@ +@@ -139,4 +139,64 @@ public class Skeleton extends AbstractSkeleton { this.spawnAtLocation(level, Items.SKELETON_SKULL); } } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Strider.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Strider.java.patch index 9d99390b1..e3be46643 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Strider.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Strider.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Strider.java b/net/minecraft/world/entity/monster/Strider.java +index afa584e2aba6bebfb2dd343215b043c983281853..4b9e60d930bc3a4bfe9aad2e81391e57cfc45d40 100644 --- a/net/minecraft/world/entity/monster/Strider.java +++ b/net/minecraft/world/entity/monster/Strider.java -@@ -392,6 +_,19 @@ +@@ -392,6 +392,19 @@ public class Strider extends Animal implements ItemSteerable { @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { boolean isFood = this.isFood(player.getItemInHand(hand)); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Vindicator.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Vindicator.java.patch index 26ace8b3e..bde4df7bc 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Vindicator.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Vindicator.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Vindicator.java b/net/minecraft/world/entity/monster/Vindicator.java +index d02b4bfc3834cdfae37983ec616ee3cbcd9f0988..79c2248b0dce457fed6d61d4b38eeb92bbc3927e 100644 --- a/net/minecraft/world/entity/monster/Vindicator.java +++ b/net/minecraft/world/entity/monster/Vindicator.java -@@ -131,6 +_,11 @@ +@@ -131,6 +131,11 @@ public class Vindicator extends AbstractIllager { RandomSource random = level.getRandom(); this.populateDefaultEquipmentSlots(random, difficulty); this.populateDefaultEquipmentEnchantments(level, random, difficulty); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch index ade69a8e9..54d51726c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java +index 39b65970a48568c95ff482b9636e7391f300ffa8..e15df574282e0f5ba5791435020bc6ac96860d15 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -118,7 +_,19 @@ +@@ -118,7 +118,19 @@ public class Zombie extends Monster { 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)); @@ -21,7 +29,7 @@ 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)); } -@@ -552,10 +_,7 @@ +@@ -552,10 +564,7 @@ public class Zombie extends Monster { } if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch index 0fd354794..23f4645ae 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java +index a8cd7103e636b57be1270d0f3549c709330b5536..6b0bbcf99941d768d235b9f96c3e112a4dfea2fc 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -130,10 +_,10 @@ +@@ -130,10 +130,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { 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/sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch index 7dbc3be98..a59f5630b 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java +index 05de183ce7b0be9b41f005b2ca36807a109fc634..eff0dec6efe043ad0cb0126061583bc5b67ba0e2 100644 --- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java +++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -@@ -112,6 +_,12 @@ +@@ -112,6 +112,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { this.maybeAlertOthers(); } @@ -13,16 +21,16 @@ super.customServerAiStep(level); } -@@ -158,6 +_,12 @@ - this.playFirstAngerSoundIn = FIRST_ANGER_SOUND_DELAY.sample(this.random); +@@ -159,6 +165,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random); } -+ + + // Purpur start - Toggle for Zombified Piglin death always counting as player kill when angry + if (livingEntity instanceof Player player && this.level().purpurConfig.zombifiedPiglinCountAsPlayerKillWhenAngry) { + this.setLastHurtByPlayer(player, this.tickCount); + } + // Purpur end - Toggle for Zombified Piglin death always counting as player kill when angry - ++ return super.setTarget(livingEntity, reason); // CraftBukkit } + diff --git a/purpur-server/minecraft-patches/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 index 1c6e7e4c3..329f7ff86 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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..df1ef03f584fcaa31bd8cfd2c7301c784e4270d8 100644 --- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java -@@ -661,13 +_,23 @@ +@@ -661,7 +661,10 @@ public class PiglinAi { public static boolean isWearingSafeArmor(LivingEntity entity) { for (EquipmentSlot equipmentSlot : EquipmentSlotGroup.ARMOR) { @@ -12,16 +20,17 @@ return true; } } - +@@ -669,6 +672,13 @@ public class PiglinAi { return false; } -+ + + // Purpur start - piglins ignore gold-trimmed armor + private static boolean isWearingGoldTrim(Item itemstack) { + net.minecraft.world.item.equipment.trim.ArmorTrim armorTrim = itemstack.components().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/npc/CatSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/CatSpawner.java.patch index 9df36fcd7..7a062ad58 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/CatSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/CatSpawner.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/npc/CatSpawner.java b/net/minecraft/world/entity/npc/CatSpawner.java +index e282b6ab6d0d1c11ee40f5f436bd50fa90ddc88b..d6ae13c19481ce33bfa0b6c9db63283009339d8c 100644 --- a/net/minecraft/world/entity/npc/CatSpawner.java +++ b/net/minecraft/world/entity/npc/CatSpawner.java -@@ -25,7 +_,7 @@ +@@ -25,7 +25,7 @@ public class CatSpawner implements CustomSpawner { if (spawnFriendlies && level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING)) { this.nextTick--; if (this.nextTick <= 0) { @@ -9,7 +17,7 @@ Player randomPlayer = level.getRandomPlayer(); if (randomPlayer != null) { RandomSource randomSource = level.random; -@@ -48,9 +_,12 @@ +@@ -48,9 +48,12 @@ public class CatSpawner implements CustomSpawner { } private void spawnInVillage(ServerLevel level, BlockPos pos) { @@ -25,7 +33,7 @@ if (entitiesOfClass.size() < 5) { this.spawnCat(pos, level, false); } -@@ -58,8 +_,11 @@ +@@ -58,8 +61,11 @@ public class CatSpawner implements CustomSpawner { } private void spawnInHut(ServerLevel level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/Villager.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/Villager.java.patch index 71cb36d56..88f1962f9 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/Villager.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/Villager.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java +index e0e0d2ea7fc60e3142c675404d152eca60263240..49d43837b88d8f278baa5062aed83a297fe20ed8 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -178,6 +_,8 @@ +@@ -178,6 +178,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler MemoryModuleType.MEETING_POINT, (villager, poiType) -> poiType.is(PoiTypes.MEETING) ); @@ -9,7 +17,7 @@ public Villager(EntityType entityType, Level level) { this(entityType, level, VillagerType.PLAINS); -@@ -196,6 +_,57 @@ +@@ -196,6 +198,57 @@ public class Villager extends AbstractVillager implements ReputationEventHandler this.setVillagerData(this.getVillagerData().withType(villagerType).withProfession(level.registryAccess(), VillagerProfession.NONE)); } @@ -67,7 +75,7 @@ @Override public Brain getBrain() { return (Brain)super.getBrain(); -@@ -292,11 +_,24 @@ +@@ -292,11 +345,24 @@ public class Villager extends AbstractVillager implements ReputationEventHandler // Paper start - EAR 2 this.customServerAiStep(level, false); } @@ -94,7 +102,7 @@ profilerFiller.pop(); if (this.assignProfessionWhenSpawned) { this.assignProfessionWhenSpawned = false; -@@ -368,6 +_,7 @@ +@@ -368,6 +434,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler return InteractionResult.CONSUME; } @@ -102,7 +110,7 @@ this.startTrading(player); } -@@ -504,7 +_,7 @@ +@@ -504,7 +571,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler private void updateDemand() { for (MerchantOffer merchantOffer : this.getOffers()) { @@ -111,7 +119,7 @@ } } -@@ -697,7 +_,7 @@ +@@ -697,7 +764,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override public boolean canBreed() { @@ -120,7 +128,7 @@ } private boolean hungry() { -@@ -919,6 +_,7 @@ +@@ -919,6 +986,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } public void spawnGolemIfNeeded(ServerLevel serverLevel, long gameTime, int minVillagerAmount) { @@ -128,7 +136,7 @@ if (this.wantsToSpawnGolem(gameTime)) { AABB aabb = this.getBoundingBox().inflate(10.0, 10.0, 10.0); List entitiesOfClass = serverLevel.getEntitiesOfClass(Villager.class, aabb); -@@ -992,6 +_,12 @@ +@@ -992,6 +1060,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override public void startSleeping(BlockPos pos) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch index 29f09b163..a1b19d097 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java +index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..b0eec451b68a6a2697b1620410f07b25c4d2fda7 100644 --- a/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/net/minecraft/world/entity/npc/WanderingTrader.java -@@ -59,6 +_,13 @@ +@@ -59,6 +59,13 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill super(entityType, level); } @@ -14,7 +22,7 @@ @Override protected void registerGoals() { this.goalSelector.addGoal(0, new FloatGoal(this)); -@@ -79,7 +_,7 @@ +@@ -79,7 +86,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill this, new ItemStack(Items.MILK_BUCKET), SoundEvents.WANDERING_TRADER_REAPPEARED, @@ -23,7 +31,7 @@ ) ); this.goalSelector.addGoal(1, new TradeWithPlayerGoal(this)); -@@ -123,8 +_,10 @@ +@@ -123,8 +130,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill return InteractionResult.CONSUME; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch index efaa61512..3ce260889 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +index 9d9ec2bf16027b479bbc4339ad4e9dcfc2077d40..d4527765262818099dfb695d6a84b56d33888e34 100644 --- a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -@@ -137,7 +_,17 @@ +@@ -137,7 +137,17 @@ public class WanderingTraderSpawner implements CustomSpawner { 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/sources/net/minecraft/world/entity/player/Player.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/player/Player.java.patch index fc57c7949..bf51097f7 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/player/Player.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/player/Player.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java +index 248ee263a853d1d3148746a63ba422115853f6a1..bd4d3a920e015db49436336cc180bc0b937750a0 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -210,11 +_,20 @@ +@@ -210,11 +210,20 @@ public abstract class Player extends LivingEntity { 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 @@ -21,7 +29,7 @@ @Override public org.bukkit.craftbukkit.entity.CraftHumanEntity getBukkitEntity() { return (org.bukkit.craftbukkit.entity.CraftHumanEntity) super.getBukkitEntity(); -@@ -277,6 +_,12 @@ +@@ -277,6 +286,12 @@ public abstract class Player extends LivingEntity { @Override public void tick() { @@ -34,7 +42,7 @@ this.noPhysics = this.isSpectator(); if (this.isSpectator() || this.isPassenger()) { this.setOnGround(false); -@@ -355,6 +_,17 @@ +@@ -355,6 +370,17 @@ public abstract class Player extends LivingEntity { this.turtleHelmetTick(); } @@ -52,7 +60,7 @@ this.cooldowns.tick(); this.updatePlayerPose(); if (this.currentImpulseContextResetGraceTime > 0) { -@@ -620,7 +_,7 @@ +@@ -620,7 +646,7 @@ public abstract class Player extends LivingEntity { List list = Lists.newArrayList(); for (Entity entity : entities) { @@ -61,7 +69,7 @@ list.add(entity); } else if (!entity.isRemoved()) { this.touch(entity); -@@ -1214,7 +_,7 @@ +@@ -1214,7 +1240,7 @@ public abstract class Player extends LivingEntity { flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits if (flag2) { damageSource = damageSource.critical(); // Paper - critical damage API @@ -70,7 +78,7 @@ } float f2 = f + f1; -@@ -1811,7 +_,23 @@ +@@ -1811,7 +1837,23 @@ public abstract class Player extends LivingEntity { @Override protected int getBaseExperienceReward(ServerLevel level) { @@ -95,17 +103,17 @@ } @Override -@@ -1849,6 +_,13 @@ - public boolean addItem(ItemStack stack) { +@@ -1850,6 +1892,13 @@ public abstract class Player extends LivingEntity { 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 - ++ public boolean setEntityOnShoulder(CompoundTag entityCompound) { if (this.isPassenger() || !this.onGround() || this.isInWater() || this.isInPowderSnow) { + return false; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch index 48ac13449..18699c96a 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java +index 595cdb7d013eb0b9282b133a22f51ee865d18623..b00e5b523a07bd3f65c6d7eee96430266e5661c9 100644 --- a/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -79,6 +_,7 @@ +@@ -79,6 +79,7 @@ public abstract class AbstractArrow extends Projectile { public ItemStack pickupItemStack = this.getDefaultPickupItem(); @Nullable public ItemStack firedFromWeapon = null; @@ -8,7 +16,7 @@ protected AbstractArrow(EntityType entityType, Level level) { super(entityType, level); -@@ -352,7 +_,7 @@ +@@ -352,7 +353,7 @@ public abstract class AbstractArrow extends Projectile { 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)); @@ -17,16 +25,16 @@ } public boolean isInGround() { -@@ -575,6 +_,12 @@ - public ItemStack getWeaponItem() { +@@ -576,6 +577,12 @@ public abstract class AbstractArrow extends Projectile { 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/sources/net/minecraft/world/entity/projectile/Snowball.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/Snowball.java.patch index 7215ffe71..4c14fc29c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/Snowball.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/Snowball.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/projectile/Snowball.java b/net/minecraft/world/entity/projectile/Snowball.java +index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..d8f9fb603fd2e3e5c1dfc05face7f42b4844daf4 100644 --- a/net/minecraft/world/entity/projectile/Snowball.java +++ b/net/minecraft/world/entity/projectile/Snowball.java -@@ -52,9 +_,39 @@ +@@ -52,10 +52,40 @@ public class Snowball extends ThrowableItemProjectile { protected void onHitEntity(EntityHitResult result) { super.onHitEntity(result); Entity entity = result.getEntity(); @@ -8,7 +16,7 @@ + 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) { @@ -38,6 +46,7 @@ + } + } + // 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/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch index 8efc70f2a..9b40f2cb6 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +index bda858b1e1c6b28cd9d5a664758b3e445eaf4f22..6575e8ef16f6011f7a799ba31531a2ebefee0c4d 100644 --- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -@@ -129,9 +_,10 @@ +@@ -129,9 +129,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { return; } // CraftBukkit end @@ -12,7 +20,7 @@ endermite.snapTo(owner.getX(), owner.getY(), owner.getZ(), owner.getYRot(), owner.getXRot()); serverLevel.addFreshEntity(endermite, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.ENDER_PEARL); } -@@ -151,7 +_,7 @@ +@@ -151,7 +152,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { if (serverPlayer1 != null) { serverPlayer1.resetFallDistance(); serverPlayer1.resetCurrentImpulseContext(); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch index b959fcd53..f43907991 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/projectile/ThrownTrident.java b/net/minecraft/world/entity/projectile/ThrownTrident.java +index 00f805667ea48fd8699f3cea05781739e376cedd..e814daaa10c138b1497dffbdf9224d34cd9c9926 100644 --- a/net/minecraft/world/entity/projectile/ThrownTrident.java +++ b/net/minecraft/world/entity/projectile/ThrownTrident.java -@@ -65,7 +_,7 @@ +@@ -65,7 +65,7 @@ public class ThrownTrident extends AbstractArrow { Entity owner = this.getOwner(); int i = this.entityData.get(ID_LOYALTY); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch index 87908eb1e..82d298a81 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/projectile/WitherSkull.java b/net/minecraft/world/entity/projectile/WitherSkull.java +index a2fdc87bedd1a63064cb8c7a7615978483268fdc..c96dc62b9f890335892a8075ed9b1285f98c9e8a 100644 --- a/net/minecraft/world/entity/projectile/WitherSkull.java +++ b/net/minecraft/world/entity/projectile/WitherSkull.java -@@ -93,7 +_,7 @@ +@@ -93,7 +93,7 @@ public class WitherSkull extends AbstractHurtingProjectile { super.onHit(result); if (!this.level().isClientSide) { // CraftBukkit start @@ -9,17 +17,17 @@ if (event.callEvent()) { this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); } -@@ -101,6 +_,13 @@ - this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +@@ -102,6 +102,13 @@ public class WitherSkull extends AbstractHurtingProjectile { } } -+ + + // 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/sources/net/minecraft/world/entity/raid/Raids.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/raid/Raids.java.patch index c0e2ddf74..b2d52d1ae 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/raid/Raids.java b/net/minecraft/world/entity/raid/Raids.java +index 693eef486f1a3b4ea7e5fd5ecf2d25d85f424d97..5837d976abf663bd46a64f46348613db9284254d 100644 --- a/net/minecraft/world/entity/raid/Raids.java +++ b/net/minecraft/world/entity/raid/Raids.java -@@ -29,6 +_,7 @@ +@@ -29,6 +29,7 @@ import net.minecraft.world.phys.Vec3; public class Raids extends SavedData { private static final String RAID_FILE_ID = "raids"; @@ -8,7 +16,7 @@ public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( Raids.RaidWithId.CODEC -@@ -81,6 +_,17 @@ +@@ -81,6 +82,17 @@ public class Raids extends SavedData { public void tick(ServerLevel level) { this.tick++; @@ -26,7 +34,7 @@ Iterator iterator = this.raidMap.values().iterator(); while (iterator.hasNext()) { -@@ -148,11 +_,13 @@ +@@ -148,11 +160,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 diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch index 5b64f6835..be34547ba 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java +index 4541bb5233e986d9993d8593afef9b12c935d00a..abfe3370382c39aeab2cc7832c0ff6ee5b95fa5b 100644 --- a/net/minecraft/world/entity/vehicle/AbstractBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java -@@ -433,6 +_,7 @@ +@@ -433,6 +433,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { float groundFriction = this.getGroundFriction(); if (groundFriction > 0.0F) { this.landFriction = groundFriction; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch index dfb044e11..2d16df145 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -391,7 +391,7 @@ public class NewMinecartBehavior extends MinecartBehavior { 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/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch index c8d066068..6dc5e984a 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java +index 0d09b0809e7b224538cf5cfac9e36ec5ba10b709..4d224dc127d245556892e761fa4927a76e4b8e9a 100644 --- a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java +++ b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java -@@ -243,8 +_,8 @@ +@@ -243,8 +243,8 @@ public class OldMinecartBehavior extends MinecartBehavior { Vec3 deltaMovement1 = this.getDeltaMovement(); double d13 = deltaMovement1.horizontalDistance(); if (d13 > 0.01) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodData.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodData.java.patch index f8e3d23f5..e4065dad2 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodData.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodData.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/food/FoodData.java b/net/minecraft/world/food/FoodData.java +index 89d783315dab8ca469a1fa724cd59a329d4c2b55..7fa061718989365725ff49abd2d19d1ba3f935f9 100644 --- a/net/minecraft/world/food/FoodData.java +++ b/net/minecraft/world/food/FoodData.java -@@ -38,6 +_,7 @@ +@@ -38,6 +38,7 @@ public class FoodData { int oldFoodLevel = this.foodLevel; org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(serverPlayer, foodProperties.nutrition() + oldFoodLevel, stack); if (!event.isCancelled()) { @@ -8,7 +16,7 @@ this.add(event.getFoodLevel() - oldFoodLevel, foodProperties.saturation()); } serverPlayer.getBukkitEntity().sendHealthUpdate(); -@@ -86,7 +_,7 @@ +@@ -86,7 +87,7 @@ public class FoodData { 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/sources/net/minecraft/world/food/FoodProperties.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch index 87515c815..c0136ca1e 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,11 @@ +@@ -42,9 +42,11 @@ public record FoodProperties(int nutrition, float saturation, boolean canAlwaysE 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 index bca7321cd..cb2da3372 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java +index 813417a09b4acc7d57e80a53d970767e230d75b1..c4721eb0efe34f5e313bc890b4e960144eca4fe1 100644 --- a/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/net/minecraft/world/inventory/AbstractContainerMenu.java -@@ -65,6 +_,7 @@ +@@ -65,6 +65,7 @@ public abstract class AbstractContainerMenu { @Nullable private ContainerSynchronizer synchronizer; private boolean suppressRemoteUpdates; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch index 1626289f6..3e768e1ac 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/inventory/AbstractFurnaceMenu.java b/net/minecraft/world/inventory/AbstractFurnaceMenu.java +index b42d55c1c0c405ce3ce073138343e74fa036fa65..b86e49b09a036532e7dbd56bc52b13cefe77f75b 100644 --- a/net/minecraft/world/inventory/AbstractFurnaceMenu.java +++ b/net/minecraft/world/inventory/AbstractFurnaceMenu.java -@@ -121,7 +_,13 @@ +@@ -121,7 +121,13 @@ public abstract class AbstractFurnaceMenu extends RecipeBookMenu { } else if (index != 1 && index != 0) { if (this.canSmelt(item)) { if (!this.moveItemStackTo(item, 0, 1, false)) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch index 910986692..ffc0ca957 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/inventory/AnvilMenu.java b/net/minecraft/world/inventory/AnvilMenu.java +index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae2392590f 100644 --- a/net/minecraft/world/inventory/AnvilMenu.java +++ b/net/minecraft/world/inventory/AnvilMenu.java -@@ -20,6 +_,12 @@ +@@ -20,6 +20,12 @@ import net.minecraft.world.level.block.AnvilBlock; import net.minecraft.world.level.block.state.BlockState; import org.slf4j.Logger; @@ -13,7 +21,7 @@ public class AnvilMenu extends ItemCombinerMenu { public static final int INPUT_SLOT = 0; public static final int ADDITIONAL_SLOT = 1; -@@ -49,6 +_,10 @@ +@@ -49,6 +55,10 @@ public class AnvilMenu extends ItemCombinerMenu { private org.bukkit.craftbukkit.inventory.view.CraftAnvilView bukkitEntity; // CraftBukkit end public boolean bypassEnchantmentLevelRestriction = false; // Paper - bypass anvil level restrictions @@ -24,7 +32,7 @@ public AnvilMenu(int containerId, Inventory playerInventory) { this(containerId, playerInventory, ContainerLevelAccess.NULL); -@@ -74,12 +_,17 @@ +@@ -74,12 +84,17 @@ public class AnvilMenu extends ItemCombinerMenu { @Override protected boolean mayPickup(Player player, boolean hasStack) { @@ -43,7 +51,7 @@ player.giveExperienceLevels(-this.cost.get()); } -@@ -126,13 +_,19 @@ +@@ -126,13 +141,19 @@ public class AnvilMenu extends ItemCombinerMenu { @Override public void createResult() { @@ -64,7 +72,7 @@ ItemStack itemStack = item.copy(); ItemStack item1 = this.inputSlots.getItem(1); ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(EnchantmentHelper.getEnchantmentsForCrafting(itemStack)); -@@ -190,23 +_,34 @@ +@@ -190,23 +211,34 @@ public class AnvilMenu extends ItemCombinerMenu { int intValue = entry.getIntValue(); intValue = level == intValue ? intValue + 1 : Math.max(intValue, level); Enchantment enchantment = holder.value(); @@ -103,7 +111,7 @@ intValue = enchantment.getMaxLevel(); } -@@ -235,6 +_,54 @@ +@@ -235,6 +267,54 @@ public class AnvilMenu extends ItemCombinerMenu { if (!this.itemName.equals(item.getHoverName().getString())) { i1 = 1; i += i1; @@ -158,7 +166,7 @@ itemStack.set(DataComponents.CUSTOM_NAME, Component.literal(this.itemName)); } } else if (item.has(DataComponents.CUSTOM_NAME)) { -@@ -259,6 +_,12 @@ +@@ -259,6 +339,12 @@ public class AnvilMenu extends ItemCombinerMenu { this.onlyRenaming = true; } @@ -171,7 +179,7 @@ if (this.cost.get() >= this.maximumRepairCost && !this.player.hasInfiniteMaterials()) { // CraftBukkit itemStack = ItemStack.EMPTY; } -@@ -279,6 +_,13 @@ +@@ -279,6 +365,13 @@ public class AnvilMenu extends ItemCombinerMenu { org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), itemStack); // CraftBukkit this.broadcastChanges(); @@ -185,7 +193,7 @@ } 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 -@@ -287,7 +_,7 @@ +@@ -287,7 +380,7 @@ public class AnvilMenu extends ItemCombinerMenu { } public static int calculateIncreasedRepairCost(int oldRepairCost) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ArmorSlot.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ArmorSlot.java.patch index 2b2579163..74c747850 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ArmorSlot.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/ArmorSlot.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -47,7 +47,7 @@ class ArmorSlot extends Slot { @Override public boolean mayPickup(Player player) { ItemStack item = this.getItem(); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch index b6a6515d1..031c5f5c2 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/inventory/EnchantmentMenu.java b/net/minecraft/world/inventory/EnchantmentMenu.java +index cf9ab4c9fba11f5a0b293978853e205de81d6fc7..d0d6ae9c9c432f8bd5d9c91113fc5491e321afad 100644 --- a/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/net/minecraft/world/inventory/EnchantmentMenu.java -@@ -63,6 +_,22 @@ +@@ -63,6 +63,22 @@ public class EnchantmentMenu extends AbstractContainerMenu { return access.getLocation(); } // CraftBukkit end @@ -23,7 +31,7 @@ }; // Paper end - Add missing InventoryHolders this.access = access; -@@ -83,6 +_,16 @@ +@@ -83,6 +99,16 @@ public class EnchantmentMenu extends AbstractContainerMenu { return EnchantmentMenu.EMPTY_SLOT_LAPIS_LAZULI; } }); @@ -40,7 +48,7 @@ this.addStandardInventorySlots(playerInventory, 8, 84); this.addDataSlot(DataSlot.shared(this.costs, 0)); this.addDataSlot(DataSlot.shared(this.costs, 1)); -@@ -299,7 +_,7 @@ +@@ -299,7 +325,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { @Override public void removed(Player player) { super.removed(player); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch index 1af1db846..98de3f0c3 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/inventory/GrindstoneMenu.java b/net/minecraft/world/inventory/GrindstoneMenu.java +index 6eaa468c90a826f9fdecf2cf672c4893122d2504..5cb69b7ffc82905e5ba8c99c76ce14348f89e21c 100644 --- a/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/net/minecraft/world/inventory/GrindstoneMenu.java -@@ -91,11 +_,13 @@ +@@ -91,11 +91,13 @@ public class GrindstoneMenu extends AbstractContainerMenu { @Override public void onTake(Player player, ItemStack stack) { access.execute((level, blockPos) -> { @@ -15,7 +23,7 @@ // Paper end - Fire BlockExpEvent on grindstone use } -@@ -124,7 +_,7 @@ +@@ -124,7 +126,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { for (Entry> entry : enchantmentsForCrafting.entrySet()) { Holder holder = entry.getKey(); int intValue = entry.getIntValue(); @@ -24,7 +32,7 @@ i += holder.value().getMinCost(intValue); } } -@@ -202,15 +_,75 @@ +@@ -202,15 +204,75 @@ public class GrindstoneMenu extends AbstractContainerMenu { for (Entry> entry : enchantmentsForCrafting.entrySet()) { Holder holder = entry.getKey(); @@ -102,7 +110,7 @@ if (item.is(Items.ENCHANTED_BOOK) && itemEnchantments.isEmpty()) { item = item.transmuteCopy(Items.BOOK); } -@@ -222,6 +_,23 @@ +@@ -222,6 +284,23 @@ public class GrindstoneMenu extends AbstractContainerMenu { } item.set(DataComponents.REPAIR_COST, i); @@ -126,7 +134,7 @@ return item; } -@@ -278,7 +_,9 @@ +@@ -278,7 +357,9 @@ public class GrindstoneMenu extends AbstractContainerMenu { 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 index 9899e30a5..f5a97d8d6 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/inventory/ItemCombinerMenu.java b/net/minecraft/world/inventory/ItemCombinerMenu.java +index 34d52c941395645e77de810855b14012c259cf02..c605bd700fd9f5a6596a2bf9648492786306b025 100644 --- a/net/minecraft/world/inventory/ItemCombinerMenu.java +++ b/net/minecraft/world/inventory/ItemCombinerMenu.java -@@ -156,7 +_,9 @@ +@@ -156,7 +156,9 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { return ItemStack.EMPTY; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/AxeItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/AxeItem.java.patch index c87b129e2..8e1d944db 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/AxeItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/AxeItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/AxeItem.java b/net/minecraft/world/item/AxeItem.java +index bd919b9a83f9736f02783b1ba3863fd1b77c7e89..eb8d2d6f9c65185f5fe16a13ab0cdbba78a25a40 100644 --- a/net/minecraft/world/item/AxeItem.java +++ b/net/minecraft/world/item/AxeItem.java -@@ -62,13 +_,15 @@ +@@ -62,13 +62,15 @@ public class AxeItem extends Item { if (playerHasBlockingItemUseIntent(context)) { return InteractionResult.PASS; } else { @@ -18,7 +26,7 @@ return InteractionResult.PASS; } // Paper end -@@ -76,8 +_,15 @@ +@@ -76,8 +78,15 @@ public class AxeItem extends Item { CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, clickedPos, itemInHand); } @@ -36,7 +44,7 @@ if (player != null) { itemInHand.hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand())); } -@@ -94,22 +_,24 @@ +@@ -94,22 +103,24 @@ public class AxeItem extends Item { && !player.isSecondaryUseActive(); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BlockItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BlockItem.java.patch index 76068462e..6814ca776 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BlockItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BlockItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java +index cc363ba3bc719d8b93992141d779b4c1d1bbd2fb..571a0f27a86ab24a9f8750ce1ab802bfd64d9ccf 100644 --- a/net/minecraft/world/item/BlockItem.java +++ b/net/minecraft/world/item/BlockItem.java -@@ -145,7 +_,16 @@ +@@ -145,7 +145,16 @@ public class BlockItem extends Item { } protected boolean updateCustomBlockEntityTag(BlockPos pos, Level level, @Nullable Player player, ItemStack stack, BlockState state) { @@ -18,7 +26,7 @@ } @Nullable -@@ -212,6 +_,7 @@ +@@ -212,6 +221,7 @@ public class BlockItem extends Item { } if (!type.onlyOpCanSetNbt() || player != null && (player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place")))) { // Spigot - add permission @@ -26,7 +34,7 @@ return customData.loadInto(blockEntity, level.registryAccess()); } -@@ -253,6 +_,7 @@ +@@ -253,6 +263,7 @@ public class BlockItem extends Item { public void onDestroyed(ItemEntity itemEntity) { ItemContainerContents itemContainerContents = itemEntity.getItem().set(DataComponents.CONTAINER, ItemContainerContents.EMPTY); if (itemContainerContents != null) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BowItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BowItem.java.patch index bb43e3ee4..e8fc5c7c2 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BowItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BowItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,11 @@ +@@ -28,6 +28,11 @@ public class BowItem extends ProjectileWeaponItem { return false; } else { ItemStack projectile = player.getProjectile(stack); @@ -12,7 +20,7 @@ if (projectile.isEmpty()) { return false; } else { -@@ -38,7 +_,7 @@ +@@ -38,7 +43,7 @@ public class BowItem extends ProjectileWeaponItem { } else { List list = draw(stack, projectile, player); if (level instanceof ServerLevel serverLevel && !list.isEmpty()) { @@ -21,7 +29,7 @@ } level.playSound( -@@ -89,7 +_,7 @@ +@@ -89,7 +94,7 @@ public class BowItem extends ProjectileWeaponItem { 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/sources/net/minecraft/world/item/BucketItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BucketItem.java.patch index a0e1bb7ac..6b5ccc48e 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BucketItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/BucketItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/BucketItem.java b/net/minecraft/world/item/BucketItem.java +index de287715568f358dd83383d68f845df9a7b5a117..8c7be8a71348a3e66c8bf6b6cb39fe002c20bdb0 100644 --- a/net/minecraft/world/item/BucketItem.java +++ b/net/minecraft/world/item/BucketItem.java -@@ -147,7 +_,7 @@ +@@ -147,7 +147,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { // CraftBukkit end if (!flag) { return hitResult != null && this.emptyContents(entity, level, hitResult.getBlockPos().relative(hitResult.getDirection()), null, direction, clicked, itemstack, hand); // CraftBukkit @@ -9,7 +17,7 @@ int x = pos.getX(); int y = pos.getY(); int z = pos.getZ(); -@@ -156,7 +_,7 @@ +@@ -156,7 +156,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { ); for (int i = 0; i < 8; i++) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/CrossbowItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/CrossbowItem.java.patch index c2e3f0e41..b593a1770 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/CrossbowItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/CrossbowItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/CrossbowItem.java b/net/minecraft/world/item/CrossbowItem.java +index 4c5a751bc5618a19ac6355564189cb283a01eb98..9275ba72415beaa4e495cae81674fd14ec671156 100644 --- a/net/minecraft/world/item/CrossbowItem.java +++ b/net/minecraft/world/item/CrossbowItem.java -@@ -66,7 +_,7 @@ +@@ -66,7 +66,7 @@ public class CrossbowItem extends ProjectileWeaponItem { ItemStack itemInHand = player.getItemInHand(hand); ChargedProjectiles chargedProjectiles = itemInHand.get(DataComponents.CHARGED_PROJECTILES); if (chargedProjectiles != null && !chargedProjectiles.isEmpty()) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/DyeColor.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/DyeColor.java.patch index e53cc098b..580f60a58 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/DyeColor.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/DyeColor.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/DyeColor.java b/net/minecraft/world/item/DyeColor.java +index 63751ad67d44bb20912870df5d0d2b2fee4d8cec..6bac07817d2916c64f703586599a2cab226872e6 100644 --- a/net/minecraft/world/item/DyeColor.java +++ b/net/minecraft/world/item/DyeColor.java -@@ -126,4 +_,10 @@ +@@ -126,4 +126,10 @@ public enum DyeColor implements StringRepresentable { 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/sources/net/minecraft/world/item/EggItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EggItem.java.patch index 7bd1d11bf..c9f359af2 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EggItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EggItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/EggItem.java b/net/minecraft/world/item/EggItem.java +index ccae6089cdc4fffca7d759252006a13c2c14691a..c4097bd6acf671ddf857350154e6e1a04e76d64b 100644 --- a/net/minecraft/world/item/EggItem.java +++ b/net/minecraft/world/item/EggItem.java -@@ -24,7 +_,7 @@ +@@ -24,7 +24,7 @@ public class EggItem extends Item implements ProjectileItem { public InteractionResult use(Level level, Player player, InteractionHand hand) { ItemStack itemInHand = player.getItemInHand(hand); // Paper start diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch index baee5e0ab..167e505fa 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -24,7 +24,7 @@ public class EndCrystalItem extends Item { Level level = context.getLevel(); BlockPos clickedPos = context.getClickedPos(); BlockState blockState = level.getBlockState(clickedPos); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch index de340dafe..2e279be82 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/EnderpearlItem.java b/net/minecraft/world/item/EnderpearlItem.java +index 3becd19d3264fa631497e967656cc7ca39252586..f824f155549857d5205ba67eb5916e0b0b65efb4 100644 --- a/net/minecraft/world/item/EnderpearlItem.java +++ b/net/minecraft/world/item/EnderpearlItem.java -@@ -24,7 +_,7 @@ +@@ -24,7 +24,7 @@ public class EnderpearlItem extends Item { if (level instanceof ServerLevel serverLevel) { // CraftBukkit start // Paper start - PlayerLaunchProjectileEvent @@ -9,7 +17,7 @@ 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 +_,7 @@ +@@ -44,6 +44,7 @@ public class EnderpearlItem extends Item { 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F) ); player.awardStat(Stats.ITEM_USED.get(this)); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/HoeItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/HoeItem.java.patch index cebe3180e..793ea8ce7 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/HoeItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/HoeItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/HoeItem.java b/net/minecraft/world/item/HoeItem.java +index 3bf3d4030c4da65fa386a8b8083d259a6046d15e..77a8d5d334cd93d23149afa8e58f4114412632df 100644 --- a/net/minecraft/world/item/HoeItem.java +++ b/net/minecraft/world/item/HoeItem.java -@@ -45,15 +_,25 @@ +@@ -45,15 +45,25 @@ public class HoeItem extends Item { public InteractionResult useOn(UseOnContext context) { Level level = context.getLevel(); BlockPos clickedPos = context.getClickedPos(); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch index 32bd1ea7c..042194dc7 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java +index 24ecca78dc1140b6fc47d59f2acefca6bc2b0220..6de42886ed681b5e00903f0d213e4d2fcaea1482 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -458,6 +_,7 @@ +@@ -458,6 +458,7 @@ public final class ItemStack implements DataComponentHolder { // revert back all captured blocks for (org.bukkit.block.BlockState blockstate : blocks) { ((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace(); @@ -8,7 +16,7 @@ } SignItem.openSign = null; // SPIGOT-6758 - Reset on early return -@@ -481,6 +_,7 @@ +@@ -481,6 +482,7 @@ public final class ItemStack implements DataComponentHolder { if (!(block.getBlock() instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Containers get placed automatically block.onPlace(serverLevel, newPos, oldBlock, true, context); } @@ -16,7 +24,7 @@ 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 } -@@ -617,6 +_,26 @@ +@@ -617,6 +619,26 @@ public final class ItemStack implements DataComponentHolder { return this.isDamageableItem() && this.getDamageValue() > 0; } @@ -43,16 +51,16 @@ public int getDamageValue() { return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage()); } -@@ -1279,6 +_,12 @@ - public boolean isEnchanted() { +@@ -1280,6 +1302,12 @@ public final class ItemStack implements DataComponentHolder { 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/sources/net/minecraft/world/item/Items.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/Items.java.patch index a5dd1c128..7bd60664e 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/Items.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/Items.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/Items.java b/net/minecraft/world/item/Items.java +index ae228cd15342ac159dd61bf4d09c2d80b7f44fee..4afa2d9f5825ccc70492b9c3d82ac5616d6f7faa 100644 --- a/net/minecraft/world/item/Items.java +++ b/net/minecraft/world/item/Items.java -@@ -382,7 +_,7 @@ +@@ -382,7 +382,7 @@ public class Items { 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); @@ -9,7 +17,7 @@ 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); -@@ -2034,7 +_,7 @@ +@@ -2034,7 +2034,7 @@ public class Items { "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/sources/net/minecraft/world/item/MapItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/MapItem.java.patch index e4abe0ae9..6ac81faf2 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/MapItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/MapItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/MapItem.java b/net/minecraft/world/item/MapItem.java +index ba0b254d43651bca1f29b5272af05d068fc37ba8..780793750c99185e8139a1cd0ad52bc7b80899a9 100644 --- a/net/minecraft/world/item/MapItem.java +++ b/net/minecraft/world/item/MapItem.java -@@ -194,6 +_,7 @@ +@@ -194,6 +194,7 @@ public class MapItem extends Item { public static void renderBiomePreviewMap(ServerLevel serverLevel, ItemStack stack) { MapItemSavedData savedData = getSavedData(stack, serverLevel); if (savedData != null) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/NameTagItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/NameTagItem.java.patch index 2a8639361..e3f683a3a 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/NameTagItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/NameTagItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/NameTagItem.java b/net/minecraft/world/item/NameTagItem.java +index a928124ee46a10e9033f771970198e36712917a6..65ff8078474d5039238e9398d8cfc12e79cc6524 100644 --- a/net/minecraft/world/item/NameTagItem.java +++ b/net/minecraft/world/item/NameTagItem.java -@@ -24,6 +_,7 @@ +@@ -24,6 +24,7 @@ public class NameTagItem extends Item { 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 index 76145281c..325dcb796 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/ProjectileWeaponItem.java b/net/minecraft/world/item/ProjectileWeaponItem.java +index 1a9f91f3ee9c4d3902106eebd2639cc85a0dc34c..fb5077450aa9f7b7a03dd20c27a68dfdaab5ef06 100644 --- a/net/minecraft/world/item/ProjectileWeaponItem.java +++ b/net/minecraft/world/item/ProjectileWeaponItem.java -@@ -109,6 +_,8 @@ +@@ -109,6 +109,8 @@ public abstract class ProjectileWeaponItem extends Item { abstractArrow.setCritArrow(true); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch index c583f3853..ff77bd88c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/ShovelItem.java b/net/minecraft/world/item/ShovelItem.java +index 887ac9f547ceaf76fd533ae47239a64c29a64b18..a290ad578498da07093ea31080cc3fbc87aa3778 100644 --- a/net/minecraft/world/item/ShovelItem.java +++ b/net/minecraft/world/item/ShovelItem.java -@@ -46,9 +_,12 @@ +@@ -46,9 +46,12 @@ public class ShovelItem extends Item { BlockState blockState1 = FLATTENABLES.get(blockState.getBlock()); BlockState blockState2 = null; Runnable afterAction = null; // Paper diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SnowballItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SnowballItem.java.patch index 9c09ecb72..be4c390e9 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SnowballItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SnowballItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/SnowballItem.java b/net/minecraft/world/item/SnowballItem.java +index 8eec16040fb9ae6bcccbd71bbe93521cdce5ccce..38b82537209449407922491506a7ca6224229ca9 100644 --- a/net/minecraft/world/item/SnowballItem.java +++ b/net/minecraft/world/item/SnowballItem.java -@@ -26,7 +_,7 @@ +@@ -26,7 +26,7 @@ public class SnowballItem extends Item implements ProjectileItem { // CraftBukkit start - moved down if (level instanceof ServerLevel serverLevel) { // Paper start - PlayerLaunchProjectileEvent diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch index 7a0553a75..0356fec46 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/SpawnEggItem.java b/net/minecraft/world/item/SpawnEggItem.java +index 7a961e5ebbdac061f6e73e4ed07fe957ba759066..d48c1dedbd39770ccf3c9c3ff3351b391601cd77 100644 --- a/net/minecraft/world/item/SpawnEggItem.java +++ b/net/minecraft/world/item/SpawnEggItem.java -@@ -57,6 +_,23 @@ +@@ -57,6 +57,23 @@ public class SpawnEggItem extends Item { if (level.getBlockEntity(clickedPos) instanceof Spawner spawner) { if (level.paperConfig().entities.spawning.disableMobSpawnerSpawnEggTransformation) return InteractionResult.FAIL; // Paper - Allow disabling mob spawner spawn egg transformation EntityType type = this.getType(level.registryAccess(), itemInHand); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ThrowablePotionItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ThrowablePotionItem.java.patch index 5cf5ead6e..d6c7d3447 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ThrowablePotionItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/ThrowablePotionItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/ThrowablePotionItem.java b/net/minecraft/world/item/ThrowablePotionItem.java +index 86198fb3150409b4b3e123982d8d3ba40b774621..6495c82fb88062875024c59a7c29d6d18b7a2f41 100644 --- a/net/minecraft/world/item/ThrowablePotionItem.java +++ b/net/minecraft/world/item/ThrowablePotionItem.java -@@ -24,7 +_,7 @@ +@@ -24,7 +24,7 @@ public abstract class ThrowablePotionItem extends PotionItem implements Projecti ItemStack itemInHand = player.getItemInHand(hand); if (level instanceof ServerLevel serverLevel) { // Paper start - PlayerLaunchProjectileEvent diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/TridentItem.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/TridentItem.java.patch index dccf0bfa8..dc1841027 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/TridentItem.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/TridentItem.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/TridentItem.java b/net/minecraft/world/item/TridentItem.java +index df629e3f2defce5e65aaf874d7c5ddff71f39c28..122e24ed6fb319c951841ac8ef328c5eb70514d4 100644 --- a/net/minecraft/world/item/TridentItem.java +++ b/net/minecraft/world/item/TridentItem.java -@@ -83,7 +_,7 @@ +@@ -83,7 +83,7 @@ public class TridentItem extends Item implements ProjectileItem { if (tridentSpinAttackStrength == 0.0F) { ItemStack itemStack = stack.copyWithCount(1); // Paper Projectile.Delayed tridentDelayed = Projectile.spawnProjectileFromRotationDelayed( // Paper - PlayerLaunchProjectileEvent( @@ -9,7 +17,7 @@ ); // 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()); -@@ -94,6 +_,7 @@ +@@ -94,6 +94,7 @@ public class TridentItem extends Item implements ProjectileItem { return false; } ThrownTrident thrownTrident = tridentDelayed.projectile(); // Paper - PlayerLaunchProjectileEvent diff --git a/purpur-server/minecraft-patches/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 index 65243f097..e7ef153a0 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,12 @@ +@@ -20,6 +20,12 @@ public record ClearAllStatusEffectsConsumeEffect() implements ConsumeEffect { @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 index fcee0a726..222efb182 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -36,6 +36,7 @@ public final class Ingredient implements StackedContents.IngredientInfo itemStacks; // Paper - Improve exact choice recipe ingredients @@ -8,7 +16,7 @@ public boolean isExact() { return this.itemStacks != null; -@@ -88,6 +_,11 @@ +@@ -88,6 +89,11 @@ public final class Ingredient implements StackedContents.IngredientInfo +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/net/minecraft/world/item/enchantment/EnchantmentHelper.java +index b86bc2e0aca5a7ef5b01be6a21c3a8bcd1ebcca0..7afb0ee8f92f4241ce3ebcd8e5fd9f50033e3a42 100644 --- a/net/minecraft/world/item/enchantment/EnchantmentHelper.java +++ b/net/minecraft/world/item/enchantment/EnchantmentHelper.java -@@ -608,4 +_,58 @@ +@@ -608,4 +608,58 @@ public class EnchantmentHelper { interface EnchantmentVisitor { void accept(Holder enchantment, int level); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch index 9671562b1..73ae134ab 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -32,7 +32,7 @@ public class ItemEnchantments implements TooltipProvider { 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 @@ -9,7 +17,7 @@ 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 +_,7 @@ +@@ -50,7 +50,7 @@ public class ItemEnchantments implements TooltipProvider { for (Entry> entry : enchantments.object2IntEntrySet()) { int intValue = entry.getIntValue(); @@ -18,7 +26,7 @@ throw new IllegalArgumentException("Enchantment " + entry.getKey() + " has invalid level " + intValue); } } -@@ -133,13 +_,13 @@ +@@ -133,13 +133,13 @@ public class ItemEnchantments implements TooltipProvider { if (level <= 0) { this.enchantments.removeInt(enchantment); } else { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch index 6a3b114a8..fbbc45aec 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/item/trading/MerchantOffer.java b/net/minecraft/world/item/trading/MerchantOffer.java +index 9333c63f217e1207eced37c5be150e192f2fcc3e..156cee58134ada34d249aab948c02adac4f6745a 100644 --- a/net/minecraft/world/item/trading/MerchantOffer.java +++ b/net/minecraft/world/item/trading/MerchantOffer.java -@@ -143,7 +_,12 @@ +@@ -143,7 +143,12 @@ public class MerchantOffer { } public void updateDemand() { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/BaseSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/BaseSpawner.java.patch index ad89287e0..e6fd66768 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/BaseSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/BaseSpawner.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/BaseSpawner.java b/net/minecraft/world/level/BaseSpawner.java +index 650ebce14d618076cec2066d134d2ae51a87076a..0babc951d9fed6d32d3dba549cc5ced4dc6b0588 100644 --- a/net/minecraft/world/level/BaseSpawner.java +++ b/net/minecraft/world/level/BaseSpawner.java -@@ -54,6 +_,7 @@ +@@ -54,6 +54,7 @@ public abstract class BaseSpawner { } public boolean isNearPlayer(Level level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/EntityGetter.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/EntityGetter.java.patch index 73e6f74b1..397967bd8 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/EntityGetter.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/EntityGetter.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java +index 892a7c1eb1b321ca6d5ca709142e7feae1220815..7719bc8ff1fbbc67cdf15e1fec28dc9233cea207 100644 --- a/net/minecraft/world/level/EntityGetter.java +++ b/net/minecraft/world/level/EntityGetter.java -@@ -185,7 +_,7 @@ +@@ -185,7 +185,7 @@ public interface EntityGetter extends ca.spottedleaf.moonrise.patches.chunk_syst default boolean hasNearbyAlivePlayer(double x, double y, double z, double distance) { for (Player player : this.players()) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch index 56101522d..0efa2b695 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java +index 418d3958b7510d469142178f9427c829b6387d83..801c4e8e01590beeb3633275f58d436d87ad746e 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -160,11 +_,55 @@ +@@ -160,11 +160,55 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl } // Paper end - add paper world config @@ -56,7 +64,7 @@ public CraftWorld getWorld() { return this.world; } -@@ -840,6 +_,8 @@ +@@ -840,6 +884,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl // 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 @@ -65,7 +73,7 @@ this.generator = generator; this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment); -@@ -2127,4 +_,14 @@ +@@ -2127,4 +2173,14 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl return this.id; } } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch index 6ce413c7d..8cf028224 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java +index 14a2514a408a66a83f7b5fb43b4c4dc8f23fd5f4..fa06ecacc27f619853c8db76d909ab4ba75dc529 100644 --- a/net/minecraft/world/level/NaturalSpawner.java +++ b/net/minecraft/world/level/NaturalSpawner.java -@@ -261,7 +_,7 @@ +@@ -261,7 +261,7 @@ public final class NaturalSpawner { mutableBlockPos.set(x, y, z); double d = x + 0.5; double d1 = z + 0.5; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch index 4bfdc6d8f..b911ff6a5 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java +index ec4b63a574e7ff2c807c283c9f4b402229864e51..1953b2e59f4f6e6f78079ade6faa93bff6bf1a27 100644 --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java -@@ -316,7 +_,7 @@ +@@ -316,7 +316,7 @@ public class ServerExplosion implements Explosion { ) { this.level = level; this.source = source; @@ -9,7 +17,7 @@ this.center = center; this.fire = fire; this.blockInteraction = blockInteraction; -@@ -638,10 +_,27 @@ +@@ -638,10 +638,27 @@ public class ServerExplosion implements Explosion { public void explode() { // CraftBukkit start diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AnvilBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AnvilBlock.java.patch index a21b8a6a3..10a201515 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AnvilBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AnvilBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/AnvilBlock.java b/net/minecraft/world/level/block/AnvilBlock.java +index e8bac6deb63e0f94fb5f8b38602b2e3333e5fa8d..b14736c25cfdd94c6e3f159e53865150b06edef6 100644 --- a/net/minecraft/world/level/block/AnvilBlock.java +++ b/net/minecraft/world/level/block/AnvilBlock.java -@@ -54,6 +_,53 @@ +@@ -54,6 +54,53 @@ public class AnvilBlock extends FallingBlock { return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getClockWise()); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AzaleaBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AzaleaBlock.java.patch index 066e2cfd6..efd21fc9b 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AzaleaBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/AzaleaBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,20 @@ +@@ -50,6 +50,20 @@ public class AzaleaBlock extends VegetationBlock implements BonemealableBlock { @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 index fd6497469..592a0cdb1 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -39,6 +39,7 @@ public abstract class BaseCoralPlantTypeBlock extends Block implements SimpleWat } protected static boolean scanForWater(BlockState state, BlockGetter level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch index e0980cdaf..87006b24f 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/BedBlock.java b/net/minecraft/world/level/block/BedBlock.java +index e72ead9ff6541f821a61ad3c50fe068a8c8bb69d..a6f4db5c99d332ac26a52d5174f75e7dc9f51fe5 100644 --- a/net/minecraft/world/level/block/BedBlock.java +++ b/net/minecraft/world/level/block/BedBlock.java -@@ -98,7 +_,7 @@ +@@ -98,7 +98,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock } Vec3 center = pos.getCenter(); @@ -9,7 +17,7 @@ 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 +_,7 @@ +@@ -146,7 +146,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock } Vec3 center = pos.getCenter(); @@ -18,7 +26,7 @@ return InteractionResult.SUCCESS_SERVER; } // CraftBukkit end -@@ -167,7 +_,7 @@ +@@ -167,7 +167,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock @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 index 20fb7e9e1..eeb7a8921 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/BigDripleafBlock.java b/net/minecraft/world/level/block/BigDripleafBlock.java +index e1193bcb666b7d38c511df7c1ebddb5897cefa8f..29248afa290b3143375f0538b4dfc80a63f8945f 100644 --- a/net/minecraft/world/level/block/BigDripleafBlock.java +++ b/net/minecraft/world/level/block/BigDripleafBlock.java -@@ -254,7 +_,7 @@ +@@ -254,7 +254,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone playTiltSound(level, pos, sound); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Block.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Block.java.patch index aee7753ae..5cd89fa0f 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Block.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Block.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/Block.java b/net/minecraft/world/level/block/Block.java +index ae3e6e31171b1bcfba1ae51a0941b52dda270acd..5613b7366bdb1d444309967bd522eac4edc1feef 100644 --- a/net/minecraft/world/level/block/Block.java +++ b/net/minecraft/world/level/block/Block.java -@@ -99,6 +_,10 @@ +@@ -99,6 +99,10 @@ public class Block extends BlockBehaviour implements ItemLike { public static final int UPDATE_LIMIT = 512; protected final StateDefinition stateDefinition; private BlockState defaultBlockState; @@ -11,7 +19,7 @@ // Paper start - Protect Bedrock and End Portal/Frames from being destroyed public final boolean isDestroyable() { return io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPermanentBlockBreakExploits || -@@ -345,7 +_,7 @@ +@@ -345,7 +349,7 @@ public class Block extends BlockBehaviour implements ItemLike { 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()) { @@ -20,7 +28,7 @@ } state.spawnAfterBreak(serverLevel, pos, ItemStack.EMPTY, false); // Paper - Properly handle xp dropping block.popExperience(serverLevel, pos, event.getExpToDrop()); // Paper - Properly handle xp dropping -@@ -363,7 +_,7 @@ +@@ -363,7 +367,7 @@ public class Block extends BlockBehaviour implements ItemLike { public static void dropResources(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity) { if (level instanceof ServerLevel) { @@ -29,7 +37,7 @@ state.spawnAfterBreak((ServerLevel)level, pos, ItemStack.EMPTY, true); } } -@@ -375,11 +_,30 @@ +@@ -375,11 +379,30 @@ public class Block extends BlockBehaviour implements ItemLike { 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) { @@ -61,11 +69,10 @@ 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); -@@ -460,7 +_,15 @@ +@@ -460,7 +483,15 @@ public class Block extends BlockBehaviour implements ItemLike { } public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { -- } + this.placer = placer; // Purpur - Store placer on Block when placed + } + @@ -73,12 +80,12 @@ + @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(); -@@ -471,7 +_,7 @@ +@@ -471,7 +502,7 @@ public class Block extends BlockBehaviour implements ItemLike { } 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/Blocks.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch index 56ad25eb5..9bedeb7ba 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/Blocks.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java +index cea1e405c940cd51cf830f28bfc6ce72c0c36a12..4941bf9df0c8ed6316572920323f7c5f6791b002 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java -@@ -6583,6 +_,7 @@ +@@ -6583,6 +6583,7 @@ public class Blocks { BlockBehaviour.Properties.of() .mapColor(MapColor.PLANT) .forceSolidOff() @@ -8,7 +16,7 @@ .instabreak() .sound(SoundType.AZALEA) .noOcclusion() -@@ -6594,6 +_,7 @@ +@@ -6594,6 +6595,7 @@ public class Blocks { BlockBehaviour.Properties.of() .mapColor(MapColor.PLANT) .forceSolidOff() diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch index 86ef53933..e93e4521d 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/BubbleColumnBlock.java b/net/minecraft/world/level/block/BubbleColumnBlock.java +index ab93da06d9e9858668aa796db497f282afa7020a..23a9c30baf8d33855703d45c2739fd5072d81adc 100644 --- a/net/minecraft/world/level/block/BubbleColumnBlock.java +++ b/net/minecraft/world/level/block/BubbleColumnBlock.java -@@ -98,9 +_,9 @@ +@@ -98,9 +98,9 @@ public class BubbleColumnBlock extends Block implements BucketPickup { if (blockState.is(Blocks.BUBBLE_COLUMN)) { return blockState; } else if (blockState.is(Blocks.SOUL_SAND)) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch index 4fec7e3b9..e2478a57c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/CactusBlock.java b/net/minecraft/world/level/block/CactusBlock.java +index 8f6878cc8e72513446895bfc79886075bfcd5565..0f8cfa5423cd1813c655237aa544dad2dc56ba4d 100644 --- a/net/minecraft/world/level/block/CactusBlock.java +++ b/net/minecraft/world/level/block/CactusBlock.java -@@ -22,7 +_,7 @@ +@@ -22,7 +22,7 @@ import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -9,7 +17,7 @@ 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 +_,7 @@ +@@ -117,7 +117,7 @@ public class CactusBlock extends Block { protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { for (Direction direction : Direction.Plane.HORIZONTAL) { BlockState blockState = level.getBlockState(pos.relative(direction)); @@ -18,7 +26,7 @@ return false; } } -@@ -141,4 +_,34 @@ +@@ -141,4 +141,34 @@ public class CactusBlock extends Block { protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) { return false; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch index c78b443f8..40bf97d83 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/CakeBlock.java b/net/minecraft/world/level/block/CakeBlock.java +index 72236993ebc4fbfc8b6316577caaa9c780bd447b..7c3b5170690af3bbdc856af96c3e01b0e55d6412 100644 --- a/net/minecraft/world/level/block/CakeBlock.java +++ b/net/minecraft/world/level/block/CakeBlock.java -@@ -109,6 +_,7 @@ +@@ -109,6 +109,7 @@ public class CakeBlock extends Block { 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/sources/net/minecraft/world/level/block/CampfireBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch index 6557f2a69..335819edf 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/CampfireBlock.java b/net/minecraft/world/level/block/CampfireBlock.java +index 028e2ad8bcb23b3f9f80a5ec551204bb2d7db1ae..642550d59e17330437028a84830520f394a41728 100644 --- a/net/minecraft/world/level/block/CampfireBlock.java +++ b/net/minecraft/world/level/block/CampfireBlock.java -@@ -124,7 +_,7 @@ +@@ -124,7 +124,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB return this.defaultBlockState() .setValue(WATERLOGGED, flag) .setValue(SIGNAL_FIRE, this.isSmokeSource(level.getBlockState(clickedPos.below()))) diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch index 3ab8cbc0e..efd17f560 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/CarvedPumpkinBlock.java b/net/minecraft/world/level/block/CarvedPumpkinBlock.java +index 7cdf16c7216878350537b5331081cb30f44d6dbb..a4854370dfdcbc7ec4c27975e4feb69d4cb48a11 100644 --- a/net/minecraft/world/level/block/CarvedPumpkinBlock.java +++ b/net/minecraft/world/level/block/CarvedPumpkinBlock.java -@@ -64,7 +_,7 @@ +@@ -64,7 +64,7 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { if (blockPatternMatch != null) { SnowGolem snowGolem = EntityType.SNOW_GOLEM.create(level, EntitySpawnReason.TRIGGERED); if (snowGolem != null) { @@ -9,7 +17,7 @@ } } else { BlockPattern.BlockPatternMatch blockPatternMatch1 = this.getOrCreateIronGolemFull().find(level, pos); -@@ -72,13 +_,23 @@ +@@ -72,13 +72,23 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { IronGolem ironGolem = EntityType.IRON_GOLEM.create(level, EntitySpawnReason.TRIGGERED); if (ironGolem != null) { ironGolem.setPlayerCreated(true); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch index 6ead2196b..8d906bdba 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/CauldronBlock.java b/net/minecraft/world/level/block/CauldronBlock.java +index d58b49e550cfa683f753db2a913fddf307a1bba2..62ee64b97dfb2f1426d43cf1f8b0b0b6ec63b5b1 100644 --- a/net/minecraft/world/level/block/CauldronBlock.java +++ b/net/minecraft/world/level/block/CauldronBlock.java -@@ -32,8 +_,8 @@ +@@ -32,8 +32,8 @@ public class CauldronBlock extends AbstractCauldronBlock { protected static boolean shouldHandlePrecipitation(Level level, Biome.Precipitation precipitation) { return precipitation == Biome.Precipitation.RAIN diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch index 631c2fafe..5ea4fd0b7 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/CaveVinesBlock.java b/net/minecraft/world/level/block/CaveVinesBlock.java +index 4e1a81c01a5c51a977e4fe9d2465e4ef20aab6d4..d67f278e8cb630b680cad22f4117a9545576bf0f 100644 --- a/net/minecraft/world/level/block/CaveVinesBlock.java +++ b/net/minecraft/world/level/block/CaveVinesBlock.java -@@ -92,4 +_,11 @@ +@@ -92,4 +92,11 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements CaveVines { public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { level.setBlock(pos, state.setValue(BERRIES, true), 2); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch index 54d2fa463..8dbb7fd3c 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -51,7 +51,7 @@ public interface ChangeOverTimeBlock> { } float f = (float)(i1 + 1) / (i1 + i + 1); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch index 92f2abf28..981c5fd5a 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/ChestBlock.java b/net/minecraft/world/level/block/ChestBlock.java +index c4937d1b482e2ec60961bda62ad6cc155f0ce8f7..43f9d4b8a7ab4cd0a1a5dee9d0c0c7790894a2ae 100644 --- a/net/minecraft/world/level/block/ChestBlock.java +++ b/net/minecraft/world/level/block/ChestBlock.java -@@ -337,6 +_,7 @@ +@@ -337,6 +337,7 @@ public class ChestBlock extends AbstractChestBlock implements } public static boolean isBlockedChestByBlock(BlockGetter level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch index 8ee18624a..cd3e2d96f 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/ComposterBlock.java b/net/minecraft/world/level/block/ComposterBlock.java +index a647d76d365a60b95a3eb7927ac426bf70d417f3..3eb11df5d14ec63911be630ca99d8d9903723f9b 100644 --- a/net/minecraft/world/level/block/ComposterBlock.java +++ b/net/minecraft/world/level/block/ComposterBlock.java -@@ -250,23 +_,52 @@ +@@ -250,17 +250,27 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { ) { int levelValue = state.getValue(LEVEL); if (levelValue < 8 && COMPOSTABLES.containsKey(stack.getItem())) { @@ -14,7 +22,6 @@ - level.levelEvent(1500, 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) { @@ -34,15 +41,15 @@ + newCount = stack.getCount(); + newLevel = newState.getValue(ComposterBlock.LEVEL); + } while (newCount > 0 && (newCount != oldCount || newLevel != oldLevel || newState != oldState)); -+ } + } + // Purpur end - Sneak to bulk process composter return InteractionResult.SUCCESS; } else { - return super.useItemOn(stack, state, level, pos, player, hand, hitResult); +@@ -268,6 +278,25 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { } } -+ + + // 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) { @@ -61,6 +68,7 @@ + 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/sources/net/minecraft/world/level/block/CoralBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch index 690cfe031..cf2a8750a 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/CoralBlock.java b/net/minecraft/world/level/block/CoralBlock.java +index e0be02eaa07d40d0738931383426517d20fe3b0b..b747af5f3c65f4b79a304b0e903f7b824fb03d8d 100644 --- a/net/minecraft/world/level/block/CoralBlock.java +++ b/net/minecraft/world/level/block/CoralBlock.java -@@ -65,6 +_,7 @@ +@@ -65,6 +65,7 @@ public class CoralBlock extends Block { } protected boolean scanForWater(BlockGetter level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch index 667d7f96f..33e4c3e6d 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/CropBlock.java b/net/minecraft/world/level/block/CropBlock.java +index a38ce03a4dab6c83a0b54f47fd3c36d6da46fa24..b370b955ac8636275dfada4f38a7ca10297f7dac 100644 --- a/net/minecraft/world/level/block/CropBlock.java +++ b/net/minecraft/world/level/block/CropBlock.java -@@ -169,7 +_,7 @@ +@@ -169,7 +169,7 @@ public class CropBlock extends VegetationBlock implements BonemealableBlock { @Override protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier) { if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent @@ -9,7 +17,7 @@ serverLevel.destroyBlock(pos, true, entity); } -@@ -204,4 +_,15 @@ +@@ -204,4 +204,15 @@ public class CropBlock extends VegetationBlock implements BonemealableBlock { protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(AGE); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch index 235a738f9..e425ca7a7 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/DoorBlock.java b/net/minecraft/world/level/block/DoorBlock.java +index 7f40ccfe379ab284424d730213b343e17239dc0c..2fa6a85b0f1694d0989905a421198c6495271beb 100644 --- a/net/minecraft/world/level/block/DoorBlock.java +++ b/net/minecraft/world/level/block/DoorBlock.java -@@ -199,6 +_,7 @@ +@@ -199,6 +199,7 @@ public class DoorBlock extends Block { protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { if (!this.type.canOpenByHand()) { return InteractionResult.PASS; @@ -8,7 +16,7 @@ } else { state = state.cycle(OPEN); level.setBlock(pos, state, 10); -@@ -287,4 +_,18 @@ +@@ -287,4 +288,18 @@ public class DoorBlock extends Block { 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 index d08f61da6..cf6af618a 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/DragonEggBlock.java b/net/minecraft/world/level/block/DragonEggBlock.java +index 5c2f10486e3aed090c6545a86276e6927e424cb2..9ed7ffb10e0a172fe5f3dd4613922428af82e5db 100644 --- a/net/minecraft/world/level/block/DragonEggBlock.java +++ b/net/minecraft/world/level/block/DragonEggBlock.java -@@ -46,6 +_,7 @@ +@@ -46,6 +46,7 @@ public class DragonEggBlock extends FallingBlock { } private void teleport(BlockState state, Level level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/EnchantingTableBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/EnchantingTableBlock.java.patch index 30d849778..7108b7ee4 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/EnchantingTableBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/EnchantingTableBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/EnchantingTableBlock.java b/net/minecraft/world/level/block/EnchantingTableBlock.java +index 523082c69aad8269cd058ad6864184c3ab51dbeb..4f4e81a845c4d3dc0e7d82ba323a8595581535e2 100644 --- a/net/minecraft/world/level/block/EnchantingTableBlock.java +++ b/net/minecraft/world/level/block/EnchantingTableBlock.java -@@ -119,4 +_,16 @@ +@@ -119,4 +119,16 @@ public class EnchantingTableBlock extends BaseEntityBlock { protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) { return false; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch index c04018815..5fa666020 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -112,7 +112,7 @@ public class FarmBlock extends Block { 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 @@ -9,7 +17,7 @@ && entity instanceof LivingEntity && (entity instanceof Player || serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) { -@@ -129,6 +_,28 @@ +@@ -129,6 +129,28 @@ public class FarmBlock extends Block { return; } @@ -38,7 +46,7 @@ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.DIRT.defaultBlockState())) { return; } -@@ -177,7 +_,7 @@ +@@ -177,7 +199,7 @@ public class FarmBlock extends Block { } } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch index 7dd50302a..6a39da4c0 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,12 @@ +@@ -34,12 +34,12 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements @Override public BlockState getStateForPlacement(RandomSource random) { @@ -15,7 +23,7 @@ } @Override -@@ -55,7 +_,7 @@ +@@ -55,7 +55,7 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements } else if (this == Blocks.CAVE_VINES) { modifier = level.spigotConfig.caveVinesModifier; } @@ -24,7 +32,7 @@ // Spigot end BlockPos blockPos = pos.relative(this.growthDirection); if (this.canGrowInto(level.getBlockState(blockPos))) { -@@ -75,11 +_,11 @@ +@@ -75,11 +75,11 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements } public BlockState getMaxAgeState(BlockState state) { @@ -38,7 +46,7 @@ } protected BlockState updateBodyAfterConvertedFromHead(BlockState head, BlockState body) { -@@ -137,13 +_,13 @@ +@@ -137,13 +137,13 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements @Override public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { BlockPos blockPos = pos.relative(this.growthDirection); @@ -54,7 +62,7 @@ } } -@@ -155,4 +_,6 @@ +@@ -155,4 +155,6 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements 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 index 1b21c6e0a..69beead50 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,6 @@ +@@ -23,6 +23,6 @@ public class HayBlock extends RotatedPillarBlock { @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/IceBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/IceBlock.java.patch index 0f5251d57..0769e8a2b 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/IceBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/IceBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/IceBlock.java b/net/minecraft/world/level/block/IceBlock.java +index be7141a4009036bcf3f92bba5d0ad74459e99bfa..a4d735a4365fdaf9e602315aa1176dfd5db77ff5 100644 --- a/net/minecraft/world/level/block/IceBlock.java +++ b/net/minecraft/world/level/block/IceBlock.java -@@ -40,7 +_,7 @@ +@@ -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)) { @@ -9,7 +17,7 @@ level.removeBlock(pos, false); return; } -@@ -65,7 +_,7 @@ +@@ -65,7 +65,7 @@ public class IceBlock extends HalfTransparentBlock { return; } // CraftBukkit end 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 index b0ce9ac1a..083e1a29f 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,11 @@ +@@ -72,4 +72,11 @@ public class KelpBlock extends GrowingPlantHeadBlock implements LiquidBlockConta protected FluidState getFluidState(BlockState state) { return Fluids.WATER.getSource(false); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch index ef0559942..d0b3b3b22 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/LiquidBlock.java b/net/minecraft/world/level/block/LiquidBlock.java +index 7320b416e8d660419018b0699f49ab6f45a3373b..ae609e0603a78423c4c89b7efb9c41ab8fe7aa52 100644 --- a/net/minecraft/world/level/block/LiquidBlock.java +++ b/net/minecraft/world/level/block/LiquidBlock.java -@@ -134,7 +_,7 @@ +@@ -134,7 +134,7 @@ public class LiquidBlock extends Block implements BucketPickup { @Override protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { @@ -9,7 +17,7 @@ level.scheduleTick(pos, state.getFluidState().getType(), this.getFlowSpeed(level, pos)); // Paper - Configurable speed for water flowing over lava } } -@@ -169,7 +_,7 @@ +@@ -169,7 +169,7 @@ public class LiquidBlock extends Block implements BucketPickup { BlockState neighborState, RandomSource random ) { @@ -18,7 +26,7 @@ scheduledTickAccess.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(level)); } -@@ -178,7 +_,7 @@ +@@ -178,7 +178,7 @@ public class LiquidBlock extends Block implements BucketPickup { @Override protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch index f9d8ca928..9ccd412f1 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/MagmaBlock.java b/net/minecraft/world/level/block/MagmaBlock.java +index db83c3630064a6875b477021a1f78bdf59c4ddc3..bbf8447cf986015f8a2e55f39d7b4f0dd9abcb23 100644 --- a/net/minecraft/world/level/block/MagmaBlock.java +++ b/net/minecraft/world/level/block/MagmaBlock.java -@@ -28,7 +_,7 @@ +@@ -28,7 +28,7 @@ public class MagmaBlock extends Block { @Override public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch index b4259d9d3..35c15d57f 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java +index 2f08780430fc643991ffb4aeba1f1ae8e78944d2..fa0d6baa40c6052c993d870d124af911e8621f0a 100644 --- a/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -72,7 +_,7 @@ +@@ -72,7 +72,7 @@ public class NetherPortalBlock extends Block implements Portal { protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { if (level.spigotConfig.enableZombiePigmenPortalSpawns && level.dimensionType().natural() // Spigot && level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) @@ -9,7 +17,7 @@ && level.anyPlayerCloseEnoughForSpawning(pos)) { while (level.getBlockState(pos).is(this)) { pos = pos.below(); -@@ -130,7 +_,7 @@ +@@ -130,7 +130,7 @@ public class NetherPortalBlock extends Block implements Portal { @Override public int getPortalTransitionTime(ServerLevel level, Entity entity) { return entity instanceof Player player diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch index 362dae20a..ba5fa07fd 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -16,7 +16,7 @@ import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -9,7 +17,7 @@ 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 +_,34 @@ +@@ -65,4 +65,34 @@ public class NetherWartBlock extends VegetationBlock { protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(AGE); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch index 42c3d0b22..3593406fe 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/NoteBlock.java b/net/minecraft/world/level/block/NoteBlock.java +index 9467d5226797f67565edf8a46fd5b48135337410..7560d49b1952dba22e88758b15a24540ca576bbb 100644 --- a/net/minecraft/world/level/block/NoteBlock.java +++ b/net/minecraft/world/level/block/NoteBlock.java -@@ -101,7 +_,7 @@ +@@ -101,7 +101,7 @@ public class NoteBlock extends Block { } private void playNote(@Nullable Entity entity, BlockState state, Level level, BlockPos pos) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch index 3202a8cee..60fd570e0 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/ObserverBlock.java b/net/minecraft/world/level/block/ObserverBlock.java +index bd2aa00ce8b78c16f6107064dd00bfbb072df0df..9fa1ed439ef9adba44f3d4738688a95fb4625b68 100644 --- a/net/minecraft/world/level/block/ObserverBlock.java +++ b/net/minecraft/world/level/block/ObserverBlock.java -@@ -81,6 +_,7 @@ +@@ -81,6 +81,7 @@ public class ObserverBlock extends DirectionalBlock { RandomSource random ) { if (state.getValue(FACING) == direction && !state.getValue(POWERED)) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch index cad7d9a3c..1541f5d80 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/PointedDripstoneBlock.java b/net/minecraft/world/level/block/PointedDripstoneBlock.java +index ef164fb4f24412e506b8abce74d509e8be6c4676..85e9aecc2045e1599488d6a137f5f9713fb1a245 100644 --- a/net/minecraft/world/level/block/PointedDripstoneBlock.java +++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java -@@ -193,20 +_,20 @@ +@@ -193,20 +193,20 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate @VisibleForTesting public static void maybeTransferFluid(BlockState state, ServerLevel level, BlockPos pos, float randChance) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch index f6c12cc4c..c3a89dac5 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/PoweredRailBlock.java b/net/minecraft/world/level/block/PoweredRailBlock.java +index 5ec12356e9f044d99762bf64a6d3bf74856d97a6..e80069d27ff60e0967d9333e2a0d6c8bf2f20a16 100644 --- a/net/minecraft/world/level/block/PoweredRailBlock.java +++ b/net/minecraft/world/level/block/PoweredRailBlock.java -@@ -28,7 +_,7 @@ +@@ -28,7 +28,7 @@ public class PoweredRailBlock extends BaseRailBlock { } protected boolean findPoweredRailSignal(Level level, BlockPos pos, BlockState state, boolean searchForward, int recursionCount) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch index c5ac40711..3a08de050 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/RespawnAnchorBlock.java b/net/minecraft/world/level/block/RespawnAnchorBlock.java +index 5b9d67d671ea70d4a8920a7f190d240c920971ac..f0b4ea2065f98f5430bba89f1a86ea5e8791aa1f 100644 --- a/net/minecraft/world/level/block/RespawnAnchorBlock.java +++ b/net/minecraft/world/level/block/RespawnAnchorBlock.java -@@ -160,7 +_,7 @@ +@@ -160,7 +160,7 @@ public class RespawnAnchorBlock extends Block { }; Vec3 center = pos2.getCenter(); level.explode( diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch index aa23616be..ca6ae5c67 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/SculkShriekerBlock.java b/net/minecraft/world/level/block/SculkShriekerBlock.java +index 757f8453e147875ab9f14d9726bb734ef27447c9..f8c9a6d7c9f1a9d2afd820244017a709db79e080 100644 --- a/net/minecraft/world/level/block/SculkShriekerBlock.java +++ b/net/minecraft/world/level/block/SculkShriekerBlock.java -@@ -118,7 +_,7 @@ +@@ -118,7 +118,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo @Nullable @Override public BlockState getStateForPlacement(BlockPlaceContext context) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch index 9e9c9b817..c7b485152 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,25 @@ +@@ -144,4 +144,25 @@ public class SlabBlock extends Block implements SimpleWaterloggedBlock { return false; } } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch index ca87324a4..488baec79 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/SnowLayerBlock.java b/net/minecraft/world/level/block/SnowLayerBlock.java +index 9131098e3ae4e6ffdf1491eb62537e385f75b6b2..ddedc08a96e500a390421d39be36590f37f49d24 100644 --- a/net/minecraft/world/level/block/SnowLayerBlock.java +++ b/net/minecraft/world/level/block/SnowLayerBlock.java -@@ -76,6 +_,7 @@ +@@ -76,6 +76,7 @@ public class SnowLayerBlock extends Block { @Override protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { BlockState blockState = level.getBlockState(pos.below()); diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch index 9c1015ed7..118c01899 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/SpawnerBlock.java b/net/minecraft/world/level/block/SpawnerBlock.java +index e8d7b6adbcb84e8d89067b54318e0feb3c3276a6..2076474168410f376beebc072af4959e5d08c101 100644 --- a/net/minecraft/world/level/block/SpawnerBlock.java +++ b/net/minecraft/world/level/block/SpawnerBlock.java -@@ -38,6 +_,59 @@ +@@ -38,6 +38,59 @@ public class SpawnerBlock extends BaseEntityBlock { ); } @@ -60,7 +68,7 @@ @Override protected void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) { super.spawnAfterBreak(state, level, pos, stack, dropExperience); -@@ -46,6 +_,7 @@ +@@ -46,6 +99,7 @@ public class SpawnerBlock extends BaseEntityBlock { @Override public int getExpDrop(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch index ab343ffb3..942f9280a 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/SpongeBlock.java b/net/minecraft/world/level/block/SpongeBlock.java +index 5d1b8c55bffc42924c4a95b1b4bd2e1e0b064af3..69822d21d0e71f4b29349af0bee2d80fa0802a3b 100644 --- a/net/minecraft/world/level/block/SpongeBlock.java +++ b/net/minecraft/world/level/block/SpongeBlock.java -@@ -53,8 +_,8 @@ +@@ -53,8 +53,8 @@ public class SpongeBlock extends Block { org.bukkit.craftbukkit.util.BlockStateListPopulator blockList = new org.bukkit.craftbukkit.util.BlockStateListPopulator(level); // CraftBukkit - Use BlockStateListPopulator BlockPos.breadthFirstTraversal( pos, @@ -11,7 +19,7 @@ (validPos, queueAdder) -> { for (Direction direction : ALL_DIRECTIONS) { queueAdder.accept(validPos.relative(direction)); -@@ -68,7 +_,7 @@ +@@ -68,7 +68,7 @@ public class SpongeBlock extends Block { BlockState blockState = blockList.getBlockState(blockPos); FluidState fluidState = blockList.getFluidState(blockPos); // CraftBukkit end @@ -20,7 +28,7 @@ return BlockPos.TraversalNodeStatus.SKIP; } else if (blockState.getBlock() instanceof BucketPickup bucketPickup && !bucketPickup.pickupBlock(null, blockList, blockPos, blockState).isEmpty()) { // CraftBukkit -@@ -76,6 +_,10 @@ +@@ -76,6 +76,10 @@ public class SpongeBlock extends Block { } else { if (blockState.getBlock() instanceof LiquidBlock) { blockList.setBlock(blockPos, Blocks.AIR.defaultBlockState(), 3); // CraftBukkit diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/StonecutterBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/StonecutterBlock.java.patch index 8cfd145db..4d34c5757 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/StonecutterBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/StonecutterBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/StonecutterBlock.java b/net/minecraft/world/level/block/StonecutterBlock.java +index 6d1ab251e7d09ada7edcde7f52ca49ae5efe16b6..a58c94a40bad1d60b970b06decde9851692a8b63 100644 --- a/net/minecraft/world/level/block/StonecutterBlock.java +++ b/net/minecraft/world/level/block/StonecutterBlock.java -@@ -93,4 +_,14 @@ +@@ -93,4 +93,14 @@ public class StonecutterBlock extends Block { protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) { return false; } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch index f388f13ce..5a7b2b373 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/SugarCaneBlock.java b/net/minecraft/world/level/block/SugarCaneBlock.java +index a8de37e173e244d7a16c19ac8805e0e4327c837a..baa56c6422c0924bb8b7c5a78db17acf784f28d6 100644 --- a/net/minecraft/world/level/block/SugarCaneBlock.java +++ b/net/minecraft/world/level/block/SugarCaneBlock.java -@@ -19,7 +_,7 @@ +@@ -19,7 +19,7 @@ import net.minecraft.world.level.material.FluidState; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -9,7 +17,7 @@ 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 +_,34 @@ +@@ -112,4 +112,34 @@ public class SugarCaneBlock extends Block { protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(AGE); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch index 165f005db..f2062adca 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/TurtleEggBlock.java b/net/minecraft/world/level/block/TurtleEggBlock.java +index 8ee103e2752290db4cb4b22bb3552bf80e2ceb92..a23626dbfacf98ef1bc7918ca35406fa71307bed 100644 --- a/net/minecraft/world/level/block/TurtleEggBlock.java +++ b/net/minecraft/world/level/block/TurtleEggBlock.java -@@ -156,7 +_,7 @@ +@@ -156,7 +156,7 @@ public class TurtleEggBlock extends Block { private boolean shouldUpdateHatchLevel(Level level) { float timeOfDay = level.getTimeOfDay(1.0F); @@ -9,7 +17,7 @@ } @Override -@@ -189,9 +_,32 @@ +@@ -189,9 +189,32 @@ public class TurtleEggBlock extends Block { } private boolean canDestroyEgg(ServerLevel level, Entity entity) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch index 89633d8f7..386e0cae4 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/TwistingVinesBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,11 @@ +@@ -34,4 +34,11 @@ public class TwistingVinesBlock extends GrowingPlantHeadBlock { protected boolean canGrowInto(BlockState state) { return NetherVines.isValidGrowthState(state); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/VegetationBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/VegetationBlock.java.patch index af22ad6c3..659724a69 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/VegetationBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/VegetationBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,24 @@ +@@ -61,4 +61,24 @@ public abstract class VegetationBlock extends Block { protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) { return pathComputationType == PathComputationType.AIR && !this.hasCollision || super.isPathfindable(state, pathComputationType); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch index be28707f2..a3f4f6440 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WeepingVinesBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,11 @@ +@@ -34,4 +34,11 @@ public class WeepingVinesBlock extends GrowingPlantHeadBlock { protected boolean canGrowInto(BlockState state) { return NetherVines.isValidGrowthState(state); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch index d92c3e43b..dcca700b9 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/block/WitherSkullBlock.java b/net/minecraft/world/level/block/WitherSkullBlock.java +index 0b6debe0e55e404e6f34b3bc437fe7c7a30cec7c..a70f552fddc58efdce770c36abb548ef8359d939 100644 --- a/net/minecraft/world/level/block/WitherSkullBlock.java +++ b/net/minecraft/world/level/block/WitherSkullBlock.java -@@ -71,6 +_,7 @@ +@@ -71,6 +71,7 @@ public class WitherSkullBlock extends SkullBlock { ); witherBoss.yBodyRot = blockPatternMatch.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F; witherBoss.makeInvulnerable(); diff --git a/purpur-server/minecraft-patches/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 index 4cb4b65da..67bd2f988 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 c5b3b5e5f621f8db152aa190374ae0fe567d6828..4e0fa0a7c639f2c0ded1bfbc8dd01da142043505 100644 --- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -@@ -186,6 +_,21 @@ +@@ -186,6 +186,21 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit } ItemStack itemStack = furnace.items.get(1); @@ -22,7 +30,7 @@ ItemStack itemStack1 = furnace.items.get(0); boolean flag1 = !itemStack1.isEmpty(); boolean flag2 = !itemStack.isEmpty(); -@@ -269,6 +_,8 @@ +@@ -269,6 +284,8 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit if (flag) { setChanged(level, pos, state); } diff --git a/purpur-server/minecraft-patches/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 index 8de0db582..0d938086a 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 b77cdbf3e8cf0e9d66c9e5288ebae38c79dae1fe..bc7b9d6faded66e95c38cfc5571b09c05af30deb 100644 --- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -142,6 +_,16 @@ +@@ -142,6 +142,16 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name public double getEffectRange() { if (this.effectRange < 0) { @@ -17,7 +25,7 @@ return this.levels * 10 + 10; } else { return effectRange; -@@ -171,6 +_,7 @@ +@@ -171,6 +181,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name int y = pos.getY(); int z = pos.getZ(); BlockPos blockPos; @@ -25,7 +33,7 @@ if (blockEntity.lastCheckY < y) { blockPos = pos; blockEntity.checkingBeamSections = Lists.newArrayList(); -@@ -200,6 +_,7 @@ +@@ -200,6 +211,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } } } else { @@ -33,7 +41,7 @@ if (section == null || blockState.getLightBlock() >= 15 && !blockState.is(Blocks.BEDROCK)) { blockEntity.checkingBeamSections.clear(); blockEntity.lastCheckY = height; -@@ -219,7 +_,7 @@ +@@ -219,7 +231,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name blockEntity.levels = updateBase(level, x, y, z); } diff --git a/purpur-server/minecraft-patches/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 index c78bf7ee8..7f8a49909 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 331eb5416307378162e39e20192ba06a047b70ea..129e63c18e8c641ad2413111632c8a54b1385d1d 100644 --- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -@@ -72,7 +_,7 @@ +@@ -72,7 +72,7 @@ public class BeehiveBlockEntity extends BlockEntity { "leash", "UUID" ); @@ -9,7 +17,7 @@ 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; -@@ -147,11 +_,33 @@ +@@ -147,11 +147,33 @@ public class BeehiveBlockEntity extends BlockEntity { return list; } @@ -43,7 +51,7 @@ // Paper start - Add EntityBlockStorage clearEntities public void clearBees() { this.stored.clear(); -@@ -389,8 +_,8 @@ +@@ -389,8 +411,8 @@ public class BeehiveBlockEntity extends BlockEntity { return this.stored.stream().map(BeehiveBlockEntity.BeeData::toOccupant).toList(); } diff --git a/purpur-server/minecraft-patches/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 index 33ed39fc8..4cf7475eb 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 a1075c26d55cc01219acd94d0138f81aa9d34c48..d7a08a4ecac2bb4f5626fb53e27f8d50b6936f1c 100644 --- a/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -105,6 +_,10 @@ +@@ -105,6 +105,10 @@ public abstract class BlockEntity { this.persistentDataContainer.putAll((CompoundTag) persistentDataTag); } // Paper end - read persistent data container @@ -11,7 +19,7 @@ } public final void loadWithComponents(CompoundTag tag, HolderLookup.Provider registries) { -@@ -118,6 +_,12 @@ +@@ -118,6 +122,12 @@ public abstract class BlockEntity { } protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) { @@ -24,7 +32,7 @@ } public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registries) { -@@ -379,4 +_,17 @@ +@@ -379,4 +389,17 @@ public abstract class BlockEntity { private ComponentHelper() { } } diff --git a/purpur-server/minecraft-patches/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 index 2b9fe8924..71e78230a 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 2f07a23a6151a4dfb28ddc0ab38ec2abefcdd27c..aeb10f21cd9dab3b134d1d8478083453dc37e3f2 100644 --- a/net/minecraft/world/level/block/entity/ConduitBlockEntity.java +++ b/net/minecraft/world/level/block/entity/ConduitBlockEntity.java -@@ -151,7 +_,7 @@ +@@ -151,7 +151,7 @@ public class ConduitBlockEntity extends BlockEntity { BlockPos blockPos1 = pos.offset(i, i1, i2x); BlockState blockState = level.getBlockState(blockPos1); @@ -9,7 +17,7 @@ if (blockState.is(block)) { positions.add(blockPos1); } -@@ -166,13 +_,13 @@ +@@ -166,13 +166,13 @@ public class ConduitBlockEntity extends BlockEntity { private static void applyEffects(Level level, BlockPos pos, List positions) { // CraftBukkit start @@ -26,7 +34,7 @@ // CraftBukkit start return i; } -@@ -209,17 +_,17 @@ +@@ -209,17 +209,17 @@ public class ConduitBlockEntity extends BlockEntity { blockEntity.destroyTargetUUID = null; } else if (blockEntity.destroyTarget == null) { List entitiesOfClass = level.getEntitiesOfClass( @@ -47,7 +55,7 @@ level.playSound( null, blockEntity.destroyTarget.getX(), -@@ -249,16 +_,22 @@ +@@ -249,16 +249,22 @@ public class ConduitBlockEntity extends BlockEntity { } public static AABB getDestroyRangeAABB(BlockPos pos) { diff --git a/purpur-server/minecraft-patches/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 index 1f4ddb733..d95ad5bf0 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 4b2462ece4eb5abb76ea9259b3e6a77f8a8e4e07..d35d04823e5d0de4487310caadd013f7dab1f419 100644 --- a/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java +++ b/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java -@@ -31,6 +_,7 @@ +@@ -31,6 +31,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable private static final RandomSource RANDOM = RandomSource.create(); @Nullable private Component name; @@ -8,7 +16,7 @@ public EnchantingTableBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.ENCHANTING_TABLE, pos, state); -@@ -42,12 +_,14 @@ +@@ -42,12 +43,14 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable if (this.hasCustomName()) { tag.store("CustomName", ComponentSerialization.CODEC, registries.createSerializationContext(NbtOps.INSTANCE), this.name); } @@ -23,7 +31,7 @@ } public static void bookAnimationTick(Level level, BlockPos pos, BlockState state, EnchantingTableBlockEntity enchantingTable) { -@@ -139,4 +_,14 @@ +@@ -139,4 +142,14 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable public void removeComponentsFromTag(CompoundTag tag) { tag.remove("CustomName"); } diff --git a/purpur-server/minecraft-patches/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 index 97ca4ad9b..1d9fb2255 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 8f87248a77c2083541105cfd1da1bc87bd122ba4..4c5de8783b2fc87a442e194e0069ce9cd5b5fd6c 100644 --- a/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -151,16 +_,32 @@ +@@ -151,16 +151,32 @@ public class SignBlockEntity extends BlockEntity { return this.setText(updater.apply(text), isFrontText); } @@ -35,11 +43,10 @@ ); } } -@@ -297,6 +_,24 @@ - // CraftBukkit - this +@@ -298,6 +314,24 @@ public class SignBlockEntity extends BlockEntity { return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel)level, 2, 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) { + final CompoundTag nbt = new CompoundTag(); @@ -57,6 +64,7 @@ + return ClientboundBlockEntityDataPacket.create(this, (blockEntity, registryAccess) -> nbt); + } + // Purpur end - Signs allow color codes - ++ @Override public ClientboundBlockEntityDataPacket getUpdatePacket() { + return ClientboundBlockEntityDataPacket.create(this); diff --git a/purpur-server/minecraft-patches/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 index bc6293606..14e1d2ad5 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -81,7 +81,7 @@ public class PistonStructureResolver { return true; } else { int i = 1; @@ -9,7 +17,7 @@ return false; } else { while (isSticky(blockState)) { -@@ -95,7 +_,7 @@ +@@ -95,7 +95,7 @@ public class PistonStructureResolver { break; } @@ -18,7 +26,7 @@ return false; } } -@@ -140,7 +_,7 @@ +@@ -140,7 +140,7 @@ public class PistonStructureResolver { return true; } diff --git a/purpur-server/minecraft-patches/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 index 7aa782b7e..3e6261b3d 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 f9fb1380be9cbe960127c208c65c19f770e50b6d..17315201b8d3546058e2440b8fb8a5bb465f1259 100644 --- a/net/minecraft/world/level/chunk/storage/EntityStorage.java +++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java -@@ -100,6 +_,7 @@ +@@ -100,6 +100,7 @@ public class EntityStorage implements EntityPersistentStorage { } // Paper end - Entity load/save limit per chunk CompoundTag compoundTag1 = new CompoundTag(); diff --git a/purpur-server/minecraft-patches/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 index 8f5ddb2d7..b9005a08b 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 384f2cd090d6d23bd1308d6e82c24338f2bf55d1..77db68349aa73d33b86a867099c9395c96d5a02d 100644 --- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -308,7 +_,7 @@ +@@ -308,7 +308,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise // Paper start private static void printOversizedLog(String msg, Path file, int x, int z) { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch index 51e0ad919..3eee25292 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/DensityFunctions.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/levelgen/DensityFunctions.java b/net/minecraft/world/level/levelgen/DensityFunctions.java +index 04527a5c65ad630f794fed9071d485aedd02257a..77731406cb3dc417aa2fe1cb4352f3d2d7d498aa 100644 --- a/net/minecraft/world/level/levelgen/DensityFunctions.java +++ b/net/minecraft/world/level/levelgen/DensityFunctions.java -@@ -528,7 +_,7 @@ +@@ -528,7 +528,7 @@ public final class DensityFunctions { int i1 = z / 2; int i2 = x % 2; int i3 = z % 2; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch index 5652d79c6..e7540fa93 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/levelgen/PhantomSpawner.java b/net/minecraft/world/level/levelgen/PhantomSpawner.java +index d2e674b046bcf82a239b4706c3b89197ec6749c8..73c038c026b20af3d8719b42470ee006d8ec5896 100644 --- a/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/net/minecraft/world/level/levelgen/PhantomSpawner.java -@@ -38,13 +_,13 @@ +@@ -38,13 +38,13 @@ public class PhantomSpawner implements CustomSpawner { 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 @@ -17,7 +25,7 @@ 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 +_,7 @@ +@@ -56,7 +56,7 @@ public class PhantomSpawner implements CustomSpawner { FluidState fluidState = level.getFluidState(blockPos1); if (NaturalSpawner.isValidEmptySpawnBlock(level, blockPos1, blockState, fluidState, EntityType.PHANTOM)) { SpawnGroupData spawnGroupData = null; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch index 78e131bae..713701fc1 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java +index ace1099a12c762b2e73b71dd3551cf351fedf067..1b06e44a267d2d4af844997ac0c557f30aaf9b15 100644 --- a/net/minecraft/world/level/material/FlowingFluid.java +++ b/net/minecraft/world/level/material/FlowingFluid.java -@@ -232,7 +_,7 @@ +@@ -232,7 +232,7 @@ public abstract class FlowingFluid extends Fluid { } } @@ -9,16 +17,16 @@ BlockState blockState1 = level.getBlockState(mutableBlockPos.setWithOffset(pos, Direction.DOWN)); FluidState fluidState1 = blockState1.getFluidState(); if (blockState1.isSolid() || this.isSourceBlockOfThisType(fluidState1)) { -@@ -319,6 +_,12 @@ - } +@@ -320,6 +320,12 @@ public abstract class FlowingFluid extends Fluid { 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 blockState, Direction direction, FluidState fluidState) { if (blockState.getBlock() instanceof LiquidBlockContainer liquidBlockContainer) { + liquidBlockContainer.placeLiquid(level, pos, blockState, 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 index 502b87bdc..a52e8b32b 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/material/LavaFluid.java b/net/minecraft/world/level/material/LavaFluid.java +index 033f252248b671e35135269dd2df6e7ca4585604..43cdc2f8fdfdeb1426e386e0084087779ef62754 100644 --- a/net/minecraft/world/level/material/LavaFluid.java +++ b/net/minecraft/world/level/material/LavaFluid.java -@@ -189,7 +_,7 @@ +@@ -189,7 +189,7 @@ public abstract class LavaFluid extends FlowingFluid { @Override public int getTickDelay(LevelReader level) { @@ -9,17 +17,17 @@ } @Override -@@ -210,6 +_,13 @@ - private void fizz(LevelAccessor level, BlockPos pos) { +@@ -211,6 +211,13 @@ public abstract class LavaFluid extends FlowingFluid { level.levelEvent(1501, 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/sources/net/minecraft/world/level/material/WaterFluid.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/material/WaterFluid.java.patch index 3bc14791b..65da285fe 100644 --- 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 @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/material/WaterFluid.java b/net/minecraft/world/level/material/WaterFluid.java +index 10e3c644e31650b0e1aad6349a83a763cf744ec8..b248fe1d66940c05d56fc322df61c52ece72e77f 100644 --- a/net/minecraft/world/level/material/WaterFluid.java +++ b/net/minecraft/world/level/material/WaterFluid.java -@@ -78,6 +_,13 @@ +@@ -78,6 +78,13 @@ public abstract class WaterFluid extends FlowingFluid { return level.getGameRules().getBoolean(GameRules.RULE_WATER_SOURCE_CONVERSION); } diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch index ef04724ea..88f8cb69f 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,7 @@ +@@ -240,7 +240,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { if ((node == null || node.costMalus < 0.0F) && verticalDeltaLimit > 0 && (cachedPathType != PathType.FENCE || this.canWalkOverFences()) @@ -9,7 +17,7 @@ && cachedPathType != PathType.TRAPDOOR && cachedPathType != PathType.POWDER_SNOW) { node = this.tryJumpOn(x, y, z, verticalDeltaLimit, nodeFloorLevel, direction, pathType, mutableBlockPos); -@@ -493,7 +_,7 @@ +@@ -493,7 +493,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { return PathType.TRAPDOOR; } else if (blockState.is(Blocks.POWDER_SNOW)) { return PathType.POWDER_SNOW; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch index 925647acc..0bdcf618d 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/level/portal/PortalShape.java b/net/minecraft/world/level/portal/PortalShape.java +index 21e3d5702fae0b1d94739744228c4cab608adb6b..07140dddebca268c25a243f6c6e082c3adf919e2 100644 --- a/net/minecraft/world/level/portal/PortalShape.java +++ b/net/minecraft/world/level/portal/PortalShape.java -@@ -28,7 +_,7 @@ +@@ -28,7 +28,7 @@ public class PortalShape { 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/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 index 138758dfe..c32a782c0 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 c8f23011a8942a5be970c606f67142cbd202b97e..7bbeed6c998c91e68376d3f17a510d68e3cd0b27 100644 --- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -@@ -81,6 +_,7 @@ +@@ -81,6 +81,7 @@ public class MapItemSavedData extends SavedData { public final Map decorations = Maps.newLinkedHashMap(); private final Map frameMarkers = Maps.newHashMap(); private int trackedDecorationCount; diff --git a/purpur-server/minecraft-patches/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 index bc7b09181..c2e5d779e 100644 --- a/purpur-server/minecraft-patches/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,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +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 +_,11 @@ +@@ -66,6 +66,11 @@ public class EnchantedCountIncreaseFunction extends LootItemConditionalFunction 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/sources/net/minecraft/world/phys/AABB.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/phys/AABB.java.patch index df49f561e..3217dcfc3 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/phys/AABB.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/phys/AABB.java.patch @@ -1,6 +1,14 @@ +From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001 +From: File +Date: Sun, 20 Apr 1997 06:37:42 -0700 +Subject: [PATCH] purpur File Patches + + +diff --git a/net/minecraft/world/phys/AABB.java b/net/minecraft/world/phys/AABB.java +index c22acc8889fbb3c9ee698624189c195ee4b5eefb..5767fbfd7f33c5276fb4335ce473b2e1baca411c 100644 --- a/net/minecraft/world/phys/AABB.java +++ b/net/minecraft/world/phys/AABB.java -@@ -465,4 +_,10 @@ +@@ -465,4 +465,10 @@ public class AABB { return new AABB(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ); } }