From bc370d5521b86c7d6ecbb14da14976ba6f79ef22 Mon Sep 17 00:00:00 2001 From: granny Date: Fri, 25 Oct 2024 23:54:53 -0700 Subject: [PATCH] 200 patches... --- .../0147-Piglin-portal-spawn-modifier.patch} | 10 +-- ...Config-to-change-max-number-of-bees.patch} | 4 +- ...-Config-for-wither-explosion-radius.patch} | 8 +-- .../0150-Gamemode-extra-permissions.patch} | 6 +- ...0151-Configurable-piston-push-limit.patch} | 4 +- ...152-Configurable-broadcast-settings.patch} | 10 +-- .../0153-Configurable-mob-blindness.patch} | 30 ++++---- ...hidden-players-from-entity-selector.patch} | 2 +- ...-to-impact-Creeper-explosion-radius.patch} | 12 ++-- .../0156-Iron-golem-calm-anger-options.patch} | 12 ++-- .../0157-Breedable-parrots.patch} | 20 +++--- ...igurable-powered-rail-boost-modifier.patch | 55 +++++++++++++++ ...ge-multiplier-critical-damage-value.patch} | 10 +-- ...n-to-disable-dragon-egg-teleporting.patch} | 6 +- ...fig-for-unverified-username-message.patch} | 4 +- ...-anvil-cumulative-cost-configurable.patch} | 4 +- ...ee-can-work-when-raining-or-at-night.patch | 41 +++++++++++ ...64-API-for-any-mob-to-burn-daylight.patch} | 68 +++++++++---------- .../0165-Config-MobEffect-by-world.patch} | 40 +++++------ ...eacon-Activation-Range-Configurable.patch} | 6 +- ...ke-lightning-rod-range-configurable.patch} | 4 +- ...fter-eating-food-fills-hunger-bar-c.patch} | 36 +++++----- ...ayer-join-full-server-by-permission.patch} | 4 +- .../0170-Add-portal-permission-bypass.patch} | 12 ++-- ...1-Shulker-spawn-from-bullet-options.patch} | 16 ++--- ...ating-glow-berries-adds-glow-effect.patch} | 16 ++--- ...-Option-to-make-drowned-break-doors.patch} | 31 +++------ ...nfigurable-hunger-starvation-damage.patch} | 12 ++-- .../0175-Enhance-SysoutCatcher.patch} | 0 .../0176-Add-uptime-command.patch} | 10 +-- .../0177-Tool-actionable-options.patch} | 40 +++-------- ...8-Store-placer-on-Block-when-placed.patch} | 28 ++++---- .../0179-Summoner-API.patch} | 36 +++++----- ...mizable-sleeping-actionbar-messages.patch} | 10 +-- ...-shulker-box-items-from-dropping-co.patch} | 10 +-- .../0182-Big-dripleaf-tilt-delay.patch} | 8 +-- ...0183-Player-ridable-in-water-option.patch} | 10 +-- ...-Enderman-teleport-on-projectile-hi.patch} | 16 ++--- .../0185-Add-compass-command.patch} | 26 +++---- .../0186-Toggle-for-kinetic-damage.patch} | 20 +++--- ...-Option-for-disable-observer-clocks.patch} | 14 ++-- ...zeable-Zombie-Villager-curing-times.patch} | 12 ++-- ...for-sponges-to-work-on-lava-and-mud.patch} | 10 +-- ...190-Toggle-for-Wither-s-spawn-sound.patch} | 14 ++-- ...-breaks-from-solid-neighbors-config.patch} | 8 +-- ...move-curse-of-binding-with-weakness.patch} | 6 +- ...0193-Conduit-behavior-configuration.patch} | 18 ++--- .../0194-Cauldron-fill-chances.patch} | 10 +-- ...o-allow-mobs-to-pathfind-over-rails.patch} | 20 +++--- .../0196-Shulker-change-color-with-dye.patch} | 10 +-- ...igurable-powered-rail-boost-modifier.patch | 39 ----------- ...ee-can-work-when-raining-or-at-night.patch | 54 --------------- 52 files changed, 443 insertions(+), 469 deletions(-) rename patches/{unapplied-server/0151-Piglin-portal-spawn-modifier.patch => server/0147-Piglin-portal-spawn-modifier.patch} (88%) rename patches/{unapplied-server/0152-Config-to-change-max-number-of-bees.patch => server/0148-Config-to-change-max-number-of-bees.patch} (93%) rename patches/{unapplied-server/0153-Config-for-wither-explosion-radius.patch => server/0149-Config-for-wither-explosion-radius.patch} (88%) rename patches/{unapplied-server/0154-Gamemode-extra-permissions.patch => server/0150-Gamemode-extra-permissions.patch} (96%) rename patches/{unapplied-server/0155-Configurable-piston-push-limit.patch => server/0151-Configurable-piston-push-limit.patch} (94%) rename patches/{unapplied-server/0156-Configurable-broadcast-settings.patch => server/0152-Configurable-broadcast-settings.patch} (88%) rename patches/{unapplied-server/0157-Configurable-mob-blindness.patch => server/0153-Configurable-mob-blindness.patch} (60%) rename patches/{unapplied-server/0158-Hide-hidden-players-from-entity-selector.patch => server/0154-Hide-hidden-players-from-entity-selector.patch} (98%) rename patches/{unapplied-server/0159-Config-for-health-to-impact-Creeper-explosion-radius.patch => server/0155-Config-for-health-to-impact-Creeper-explosion-radius.patch} (84%) rename patches/{unapplied-server/0160-Iron-golem-calm-anger-options.patch => server/0156-Iron-golem-calm-anger-options.patch} (92%) rename patches/{unapplied-server/0161-Breedable-parrots.patch => server/0157-Breedable-parrots.patch} (81%) create mode 100644 patches/server/0158-Configurable-powered-rail-boost-modifier.patch rename patches/{unapplied-server/0163-Add-config-change-multiplier-critical-damage-value.patch => server/0159-Add-config-change-multiplier-critical-damage-value.patch} (85%) rename patches/{unapplied-server/0164-Option-to-disable-dragon-egg-teleporting.patch => server/0160-Option-to-disable-dragon-egg-teleporting.patch} (87%) rename patches/{unapplied-server/0165-Config-for-unverified-username-message.patch => server/0161-Config-for-unverified-username-message.patch} (94%) rename patches/{unapplied-server/0166-Make-anvil-cumulative-cost-configurable.patch => server/0162-Make-anvil-cumulative-cost-configurable.patch} (93%) create mode 100644 patches/server/0163-Bee-can-work-when-raining-or-at-night.patch rename patches/{unapplied-server/0168-API-for-any-mob-to-burn-daylight.patch => server/0164-API-for-any-mob-to-burn-daylight.patch} (88%) rename patches/{unapplied-server/0169-Config-MobEffect-by-world.patch => server/0165-Config-MobEffect-by-world.patch} (73%) rename patches/{unapplied-server/0170-Beacon-Activation-Range-Configurable.patch => server/0166-Beacon-Activation-Range-Configurable.patch} (90%) rename patches/{unapplied-server/0171-Make-lightning-rod-range-configurable.patch => server/0167-Make-lightning-rod-range-configurable.patch} (91%) rename patches/{unapplied-server/0172-Burp-delay-burp-after-eating-food-fills-hunger-bar-c.patch => server/0168-Burp-delay-burp-after-eating-food-fills-hunger-bar-c.patch} (67%) rename patches/{unapplied-server/0173-Allow-player-join-full-server-by-permission.patch => server/0169-Allow-player-join-full-server-by-permission.patch} (90%) rename patches/{unapplied-server/0174-Add-portal-permission-bypass.patch => server/0170-Add-portal-permission-bypass.patch} (83%) rename patches/{unapplied-server/0175-Shulker-spawn-from-bullet-options.patch => server/0171-Shulker-spawn-from-bullet-options.patch} (90%) rename patches/{unapplied-server/0176-Eating-glow-berries-adds-glow-effect.patch => server/0172-Eating-glow-berries-adds-glow-effect.patch} (80%) rename patches/{unapplied-server/0177-Option-to-make-drowned-break-doors.patch => server/0173-Option-to-make-drowned-break-doors.patch} (70%) rename patches/{unapplied-server/0178-Configurable-hunger-starvation-damage.patch => server/0174-Configurable-hunger-starvation-damage.patch} (74%) rename patches/{unapplied-server/0179-Enhance-SysoutCatcher.patch => server/0175-Enhance-SysoutCatcher.patch} (100%) rename patches/{unapplied-server/0180-Add-uptime-command.patch => server/0176-Add-uptime-command.patch} (95%) rename patches/{unapplied-server/0181-Tool-actionable-options.patch => server/0177-Tool-actionable-options.patch} (96%) rename patches/{unapplied-server/0182-Store-placer-on-Block-when-placed.patch => server/0178-Store-placer-on-Block-when-placed.patch} (64%) rename patches/{unapplied-server/0183-Summoner-API.patch => server/0179-Summoner-API.patch} (89%) rename patches/{unapplied-server/0184-Customizable-sleeping-actionbar-messages.patch => server/0180-Customizable-sleeping-actionbar-messages.patch} (92%) rename patches/{unapplied-server/0185-option-to-disable-shulker-box-items-from-dropping-co.patch => server/0181-option-to-disable-shulker-box-items-from-dropping-co.patch} (86%) rename patches/{unapplied-server/0186-Big-dripleaf-tilt-delay.patch => server/0182-Big-dripleaf-tilt-delay.patch} (89%) rename patches/{unapplied-server/0187-Player-ridable-in-water-option.patch => server/0183-Player-ridable-in-water-option.patch} (85%) rename patches/{unapplied-server/0188-Config-to-disable-Enderman-teleport-on-projectile-hi.patch => server/0184-Config-to-disable-Enderman-teleport-on-projectile-hi.patch} (75%) rename patches/{unapplied-server/0189-Add-compass-command.patch => server/0185-Add-compass-command.patch} (93%) rename patches/{unapplied-server/0190-Toggle-for-kinetic-damage.patch => server/0186-Toggle-for-kinetic-damage.patch} (72%) rename patches/{unapplied-server/0191-Add-Option-for-disable-observer-clocks.patch => server/0187-Add-Option-for-disable-observer-clocks.patch} (65%) rename patches/{unapplied-server/0192-Customizeable-Zombie-Villager-curing-times.patch => server/0188-Customizeable-Zombie-Villager-curing-times.patch} (85%) rename patches/{unapplied-server/0193-Option-for-sponges-to-work-on-lava-and-mud.patch => server/0189-Option-for-sponges-to-work-on-lava-and-mud.patch} (87%) rename patches/{unapplied-server/0194-Toggle-for-Wither-s-spawn-sound.patch => server/0190-Toggle-for-Wither-s-spawn-sound.patch} (76%) rename patches/{unapplied-server/0195-Cactus-breaks-from-solid-neighbors-config.patch => server/0191-Cactus-breaks-from-solid-neighbors-config.patch} (84%) rename patches/{unapplied-server/0196-Config-to-remove-curse-of-binding-with-weakness.patch => server/0192-Config-to-remove-curse-of-binding-with-weakness.patch} (92%) rename patches/{unapplied-server/0197-Conduit-behavior-configuration.patch => server/0193-Conduit-behavior-configuration.patch} (89%) rename patches/{unapplied-server/0198-Cauldron-fill-chances.patch => server/0194-Cauldron-fill-chances.patch} (91%) rename patches/{unapplied-server/0199-Config-to-allow-mobs-to-pathfind-over-rails.patch => server/0195-Config-to-allow-mobs-to-pathfind-over-rails.patch} (69%) rename patches/{unapplied-server/0200-Shulker-change-color-with-dye.patch => server/0196-Shulker-change-color-with-dye.patch} (88%) delete mode 100644 patches/unapplied-server/0162-Configurable-powered-rail-boost-modifier.patch delete mode 100644 patches/unapplied-server/0167-Bee-can-work-when-raining-or-at-night.patch diff --git a/patches/unapplied-server/0151-Piglin-portal-spawn-modifier.patch b/patches/server/0147-Piglin-portal-spawn-modifier.patch similarity index 88% rename from patches/unapplied-server/0151-Piglin-portal-spawn-modifier.patch rename to patches/server/0147-Piglin-portal-spawn-modifier.patch index d6c7a1033f..cd02e0ae27 100644 --- a/patches/unapplied-server/0151-Piglin-portal-spawn-modifier.patch +++ b/patches/server/0147-Piglin-portal-spawn-modifier.patch @@ -18,10 +18,10 @@ Difficulties: 3 - hard diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -index e8cccf3d89ecef13c0523c2357ef4b07e30a25b4..971dd866fe5d6fcef573cb52582ccb7faf01b2f1 100644 +index c00b13482ce3f603f1d85b9a5ad36b768de5a9f8..10e747edebd6463cdfcea592cec1c232d837f21b 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -77,7 +77,7 @@ public class NetherPortalBlock extends Block implements Portal { +@@ -78,7 +78,7 @@ public class NetherPortalBlock extends Block implements Portal { @Override protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { @@ -31,10 +31,10 @@ index e8cccf3d89ecef13c0523c2357ef4b07e30a25b4..971dd866fe5d6fcef573cb52582ccb7f pos = pos.below(); } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 22de19aeb28795484525ddb22df96b89f915eceb..e3522c713a2ed08ee7ef35c048dd7913cb1b2567 100644 +index 0f940d6b8d927355cf0ae120e857b62be8af7806..cd4a2b84ad0f2b3d48a7795118ff1a9e60bab9a5 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1702,6 +1702,7 @@ public class PurpurWorldConfig { +@@ -1698,6 +1698,7 @@ public class PurpurWorldConfig { public double piglinScale = 1.0D; public boolean piglinBypassMobGriefing = false; public boolean piglinTakeDamageFromWater = false; @@ -42,7 +42,7 @@ index 22de19aeb28795484525ddb22df96b89f915eceb..e3522c713a2ed08ee7ef35c048dd7913 private void piglinSettings() { piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable); piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater); -@@ -1715,6 +1716,7 @@ public class PurpurWorldConfig { +@@ -1711,6 +1712,7 @@ public class PurpurWorldConfig { piglinScale = Mth.clamp(getDouble("mobs.piglin.attributes.scale", piglinScale), 0.0625D, 16.0D); piglinBypassMobGriefing = getBoolean("mobs.piglin.bypass-mob-griefing", piglinBypassMobGriefing); piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater); diff --git a/patches/unapplied-server/0152-Config-to-change-max-number-of-bees.patch b/patches/server/0148-Config-to-change-max-number-of-bees.patch similarity index 93% rename from patches/unapplied-server/0152-Config-to-change-max-number-of-bees.patch rename to patches/server/0148-Config-to-change-max-number-of-bees.patch index 4f146586de..6fa24e6304 100644 --- a/patches/unapplied-server/0152-Config-to-change-max-number-of-bees.patch +++ b/patches/server/0148-Config-to-change-max-number-of-bees.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config to change max number of bees diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -index f933fa419a4b55b0096ff42caf1b071d027b8e7e..fb84af3b1709101fa572d11a1c27970a316f2eab 100644 +index 83ad45aed0894e90825d22e078632352c3a06816..b7ad467d7d7f50bcb90e50f00f905873e89c7956 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -@@ -59,7 +59,7 @@ public class BeehiveBlockEntity extends BlockEntity { +@@ -60,7 +60,7 @@ public class BeehiveBlockEntity extends BlockEntity { private List stored = Lists.newArrayList(); @Nullable public BlockPos savedFlowerPos; diff --git a/patches/unapplied-server/0153-Config-for-wither-explosion-radius.patch b/patches/server/0149-Config-for-wither-explosion-radius.patch similarity index 88% rename from patches/unapplied-server/0153-Config-for-wither-explosion-radius.patch rename to patches/server/0149-Config-for-wither-explosion-radius.patch index 9c5c022a15..3836caaae8 100644 --- a/patches/unapplied-server/0153-Config-for-wither-explosion-radius.patch +++ b/patches/server/0149-Config-for-wither-explosion-radius.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Config for wither explosion radius diff --git a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java -index e472df057d087fe46bd40b798c050ed6e38a283c..999453409c19abf7f5b5c2dc399699856e57329e 100644 +index e0f25b057b7b908a10038d9e9695a500aa883c75..e63b408594b5d2673148e39c1deafc8510537bee 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java +++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java @@ -103,7 +103,7 @@ public class WitherSkull extends AbstractHurtingProjectile { @@ -18,10 +18,10 @@ index e472df057d087fe46bd40b798c050ed6e38a283c..999453409c19abf7f5b5c2dc39969985 if (!event.isCancelled()) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index e3522c713a2ed08ee7ef35c048dd7913cb1b2567..b3cee9f29fc9ee891d4b18ebfec219e80126a390 100644 +index cd4a2b84ad0f2b3d48a7795118ff1a9e60bab9a5..b44b3bb34c6ba32006cf2eab2d7001e766391c4f 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -2399,6 +2399,7 @@ public class PurpurWorldConfig { +@@ -2395,6 +2395,7 @@ public class PurpurWorldConfig { public boolean witherBypassMobGriefing = false; public boolean witherTakeDamageFromWater = false; public boolean witherCanRideVehicles = false; @@ -29,7 +29,7 @@ index e3522c713a2ed08ee7ef35c048dd7913cb1b2567..b3cee9f29fc9ee891d4b18ebfec219e8 private void witherSettings() { witherRidable = getBoolean("mobs.wither.ridable", witherRidable); witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater); -@@ -2420,6 +2421,7 @@ public class PurpurWorldConfig { +@@ -2416,6 +2417,7 @@ public class PurpurWorldConfig { witherBypassMobGriefing = getBoolean("mobs.wither.bypass-mob-griefing", witherBypassMobGriefing); witherTakeDamageFromWater = getBoolean("mobs.wither.takes-damage-from-water", witherTakeDamageFromWater); witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles); diff --git a/patches/unapplied-server/0154-Gamemode-extra-permissions.patch b/patches/server/0150-Gamemode-extra-permissions.patch similarity index 96% rename from patches/unapplied-server/0154-Gamemode-extra-permissions.patch rename to patches/server/0150-Gamemode-extra-permissions.patch index 5456aa0518..d342e1977d 100644 --- a/patches/unapplied-server/0154-Gamemode-extra-permissions.patch +++ b/patches/server/0150-Gamemode-extra-permissions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Gamemode extra permissions diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index 2f7ed5b38e8930b3a615f160cdf4c5b0ec932a8d..08e783882d0b2ef3ebf88e664f1a3d8bf65f49f2 100644 +index ae2d9c91afe13d07fd0de6d455b90a2a704a2c91..0d133cd7993eb40b19e2aabe8e2bfcdcf5352398 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java -@@ -209,6 +209,19 @@ public class CommandSourceStack implements ExecutionCommandSource { // Paper start - Add Adventure message to PlayerAdvancementDoneEvent - if (event.message() != null && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) { + if (event.message() != null && this.player.serverLevel().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) { + if (org.purpurmc.purpur.PurpurConfig.advancementOnlyBroadcastToAffectedPlayer) this.player.sendMessage(message); else // Purpur this.playerList.broadcastSystemMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.message()), false); // Paper end } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 513ab3d7d3ff4fe0a5c9c609ca752357b2d8055a..e081734828f7991ffc33233843779fd65f9ea9d7 100644 +index 8d4e50aade704403cd713506268a1711080f72a3..5d611f5d8ccd635b376bded93bd0278323a585ba 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1082,6 +1082,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple +@@ -1335,6 +1335,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple })); PlayerTeam scoreboardteam = this.getTeam(); @@ -29,7 +29,7 @@ index 513ab3d7d3ff4fe0a5c9c609ca752357b2d8055a..e081734828f7991ffc33233843779fd6 if (scoreboardteam.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) { this.server.getPlayerList().broadcastSystemToTeam(this, ichatbasecomponent); diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 9d0fe642adec085ba308aa40a00f0ff99c18521e..40e06f4d0547b391497944475f3ea30c4d8ff76c 100644 +index 6f06956825003ff55604c2e4aea66099ece2470c..feeaae5b0a8881ce5faf46940ad22b299a33d5eb 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -205,6 +205,18 @@ public class PurpurConfig { diff --git a/patches/unapplied-server/0157-Configurable-mob-blindness.patch b/patches/server/0153-Configurable-mob-blindness.patch similarity index 60% rename from patches/unapplied-server/0157-Configurable-mob-blindness.patch rename to patches/server/0153-Configurable-mob-blindness.patch index 978d3772d6..8428e8b590 100644 --- a/patches/unapplied-server/0157-Configurable-mob-blindness.patch +++ b/patches/server/0153-Configurable-mob-blindness.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable mob blindness Ported from https://github.com/raltsmc/mobblindness diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d4ba4752b04ad3d1a8133c56144800af756f4aa6..b0d9f432eb9ebaf88196de4f1329ef530b422ca0 100644 +index 64e30f4b32484da95a5eb6d5556fdc8f66727410..e937eb4e89bf08e3fee8ea2ca0643b0206964de1 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1042,6 +1042,17 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1067,6 +1067,17 @@ public abstract class LivingEntity extends Entity implements Attackable { if (entitytypes == EntityType.SKELETON && itemstack.is(Items.SKELETON_SKULL) || entitytypes == EntityType.ZOMBIE && itemstack.is(Items.ZOMBIE_HEAD) || entitytypes == EntityType.PIGLIN && itemstack.is(Items.PIGLIN_HEAD) || entitytypes == EntityType.PIGLIN_BRUTE && itemstack.is(Items.PIGLIN_HEAD) || entitytypes == EntityType.CREEPER && itemstack.is(Items.CREEPER_HEAD)) { d0 *= 0.5D; } @@ -28,22 +28,22 @@ index d4ba4752b04ad3d1a8133c56144800af756f4aa6..b0d9f432eb9ebaf88196de4f1329ef53 return d0; diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 89932b59058db834174919eb57007638e0b92bbd..e9075362020d3dec49b3fbcbbe80a00264d3c6fd 100644 +index b7ea3706aa0a339c4197cbf6f62f1b9b7499002f..9ba71358ef10fcaf5339b7341483b037537a0f01 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -135,6 +135,7 @@ public class PurpurWorldConfig { - public boolean persistentDroppableEntityDisplayNames = true; - public boolean projectilesBypassMobGriefing = false; +@@ -137,6 +137,7 @@ public class PurpurWorldConfig { + public boolean imposeTeleportRestrictionsOnNetherPortals = false; + public boolean imposeTeleportRestrictionsOnEndPortals = false; public boolean tickFluids = true; + public double mobsBlindnessMultiplier = 1; - public double tridentLoyaltyVoidReturnHeight = 0.0D; - public int raidCooldownSeconds = 0; - public int animalBreedingCooldownSeconds = 0; -@@ -155,6 +156,7 @@ public class PurpurWorldConfig { - persistentDroppableEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-droppable-entity-display-names", persistentDroppableEntityDisplayNames); - projectilesBypassMobGriefing = getBoolean("gameplay-mechanics.projectiles-bypass-mob-griefing", projectilesBypassMobGriefing); + private void miscGameplayMechanicsSettings() { + useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending); + alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative); +@@ -156,6 +157,7 @@ public class PurpurWorldConfig { + imposeTeleportRestrictionsOnNetherPortals = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-nether-portals", imposeTeleportRestrictionsOnNetherPortals); + imposeTeleportRestrictionsOnEndPortals = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-end-portals", imposeTeleportRestrictionsOnEndPortals); tickFluids = getBoolean("gameplay-mechanics.tick-fluids", tickFluids); + mobsBlindnessMultiplier = getDouble("gameplay-mechanics.entity-blindness-multiplier", mobsBlindnessMultiplier); - tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight); - raidCooldownSeconds = getInt("gameplay-mechanics.raid-cooldown-seconds", raidCooldownSeconds); - animalBreedingCooldownSeconds = getInt("gameplay-mechanics.animal-breeding-cooldown-seconds", animalBreedingCooldownSeconds); + } + + public int daytimeTicks = 12000; diff --git a/patches/unapplied-server/0158-Hide-hidden-players-from-entity-selector.patch b/patches/server/0154-Hide-hidden-players-from-entity-selector.patch similarity index 98% rename from patches/unapplied-server/0158-Hide-hidden-players-from-entity-selector.patch rename to patches/server/0154-Hide-hidden-players-from-entity-selector.patch index 662332abba..9b0c7c5838 100644 --- a/patches/unapplied-server/0158-Hide-hidden-players-from-entity-selector.patch +++ b/patches/server/0154-Hide-hidden-players-from-entity-selector.patch @@ -59,7 +59,7 @@ index c8d39e6e1c570c9219f6066da273dc0130920519..b455c7e9d18bac3654daa8510f85cc21 + // Purpur end } diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 40e06f4d0547b391497944475f3ea30c4d8ff76c..82e79211ec48578dad18e590ab1f9b58ae024c7c 100644 +index feeaae5b0a8881ce5faf46940ad22b299a33d5eb..881f3621233834aca8c8d5381e41d2a3fc9237da 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -248,6 +248,7 @@ public class PurpurConfig { diff --git a/patches/unapplied-server/0159-Config-for-health-to-impact-Creeper-explosion-radius.patch b/patches/server/0155-Config-for-health-to-impact-Creeper-explosion-radius.patch similarity index 84% rename from patches/unapplied-server/0159-Config-for-health-to-impact-Creeper-explosion-radius.patch rename to patches/server/0155-Config-for-health-to-impact-Creeper-explosion-radius.patch index 06bd60a269..ca2ba8ca43 100644 --- a/patches/unapplied-server/0159-Config-for-health-to-impact-Creeper-explosion-radius.patch +++ b/patches/server/0155-Config-for-health-to-impact-Creeper-explosion-radius.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Config for health to impact Creeper explosion radius diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index 902191001a7302872ff661564fb6389457abaa9c..1769c1d31bb68904be426e1069266cec809cf31a 100644 +index ad3a3d8e7ab660be5afb8e00948b87387196ebb7..941eb2b4264f620500347b012c0d9f448133ed78 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -@@ -374,9 +374,10 @@ public class Creeper extends Monster implements PowerableMob { +@@ -373,9 +373,10 @@ public class Creeper extends Monster { - if (!this.level().isClientSide) { + if (world instanceof ServerLevel worldserver) { float f = this.isPowered() ? 2.0F : 1.0F; + float multiplier = this.level().purpurConfig.creeperHealthRadius ? this.getHealth() / this.getMaxHealth() : 1; // Purpur @@ -21,10 +21,10 @@ index 902191001a7302872ff661564fb6389457abaa9c..1769c1d31bb68904be426e1069266cec // CraftBukkit end this.dead = true; diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index e9075362020d3dec49b3fbcbbe80a00264d3c6fd..898e82aac8f2636a95e6987f967d6c57c0e412da 100644 +index 9ba71358ef10fcaf5339b7341483b037537a0f01..9ab90bac6c13a063fa851be0e55a81fed8b71492 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -939,6 +939,7 @@ public class PurpurWorldConfig { +@@ -937,6 +937,7 @@ public class PurpurWorldConfig { public boolean creeperBypassMobGriefing = false; public boolean creeperTakeDamageFromWater = false; public boolean creeperExplodeWhenKilled = false; @@ -32,7 +32,7 @@ index e9075362020d3dec49b3fbcbbe80a00264d3c6fd..898e82aac8f2636a95e6987f967d6c57 private void creeperSettings() { creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable); creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater); -@@ -955,6 +956,7 @@ public class PurpurWorldConfig { +@@ -953,6 +954,7 @@ public class PurpurWorldConfig { creeperBypassMobGriefing = getBoolean("mobs.creeper.bypass-mob-griefing", creeperBypassMobGriefing); creeperTakeDamageFromWater = getBoolean("mobs.creeper.takes-damage-from-water", creeperTakeDamageFromWater); creeperExplodeWhenKilled = getBoolean("mobs.creeper.explode-when-killed", creeperExplodeWhenKilled); diff --git a/patches/unapplied-server/0160-Iron-golem-calm-anger-options.patch b/patches/server/0156-Iron-golem-calm-anger-options.patch similarity index 92% rename from patches/unapplied-server/0160-Iron-golem-calm-anger-options.patch rename to patches/server/0156-Iron-golem-calm-anger-options.patch index b2ddb9dd02..d5d65f6c49 100644 --- a/patches/unapplied-server/0160-Iron-golem-calm-anger-options.patch +++ b/patches/server/0156-Iron-golem-calm-anger-options.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Iron golem calm anger options diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -index 0cf985cac3279c0cb6255f02b76a5012027cae99..446a2795aa8f2ddf472f8b379534978fca285f3d 100644 +index 6396d31a14815fbe4f9f51dc610af317566bf522..db8420f6d1356d400699bd09e67e580546295af7 100644 --- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java +++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java @@ -93,6 +93,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { @@ -16,19 +16,19 @@ index 0cf985cac3279c0cb6255f02b76a5012027cae99..446a2795aa8f2ddf472f8b379534978f this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0D, true)); this.goalSelector.addGoal(2, new MoveTowardsTargetGoal(this, 0.9D, 32.0F)); -@@ -316,6 +317,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -310,6 +311,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { this.playSound(SoundEvents.IRON_GOLEM_REPAIR, 1.0F, f1); itemstack.consume(1, player); + if (this.level().purpurConfig.ironGolemHealCalm && isAngry() && getHealth() == getMaxHealth()) stopBeingAngry(); // Purpur - return InteractionResult.sidedSuccess(this.level().isClientSide); + return InteractionResult.SUCCESS; } } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 898e82aac8f2636a95e6987f967d6c57c0e412da..f7a854144d447f6464473ee437c36d1e16984cab 100644 +index 9ab90bac6c13a063fa851be0e55a81fed8b71492..b5f3137c6b96e0043e5249144dd5a2784c5c1d5a 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1429,6 +1429,8 @@ public class PurpurWorldConfig { +@@ -1425,6 +1425,8 @@ public class PurpurWorldConfig { public double ironGolemMaxHealth = 100.0D; public double ironGolemScale = 1.0D; public boolean ironGolemTakeDamageFromWater = false; @@ -37,7 +37,7 @@ index 898e82aac8f2636a95e6987f967d6c57c0e412da..f7a854144d447f6464473ee437c36d1e private void ironGolemSettings() { ironGolemRidable = getBoolean("mobs.iron_golem.ridable", ironGolemRidable); ironGolemRidableInWater = getBoolean("mobs.iron_golem.ridable-in-water", ironGolemRidableInWater); -@@ -1442,6 +1444,8 @@ public class PurpurWorldConfig { +@@ -1438,6 +1440,8 @@ public class PurpurWorldConfig { ironGolemMaxHealth = getDouble("mobs.iron_golem.attributes.max_health", ironGolemMaxHealth); ironGolemScale = Mth.clamp(getDouble("mobs.iron_golem.attributes.scale", ironGolemScale), 0.0625D, 16.0D); ironGolemTakeDamageFromWater = getBoolean("mobs.iron_golem.takes-damage-from-water", ironGolemTakeDamageFromWater); diff --git a/patches/unapplied-server/0161-Breedable-parrots.patch b/patches/server/0157-Breedable-parrots.patch similarity index 81% rename from patches/unapplied-server/0161-Breedable-parrots.patch rename to patches/server/0157-Breedable-parrots.patch index f12a10f717..2fa6e0d831 100644 --- a/patches/unapplied-server/0161-Breedable-parrots.patch +++ b/patches/server/0157-Breedable-parrots.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Breedable parrots diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -index 884fc114ef70d49fd0d64fcea46fb277950962a1..4fa32a6406e3158369064d39160e485010484886 100644 +index 9c7e29307b811d859a0d743b232463e18391b5f0..0afa483c6436c4f51955b04a4fe6920a27092284 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -@@ -222,6 +222,7 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) { -@@ -366,13 +368,13 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder type, LevelAccessor world, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) { +@@ -368,13 +370,13 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder +Date: Fri, 14 May 2021 21:22:57 +0100 +Subject: [PATCH] Configurable powered rail boost modifier + + +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java b/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java +index 00b0004940339dc105fb95f813bd35b16f7a9fb4..934218634854a90c0c8230e3da2d6da3d6916645 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java +@@ -426,7 +426,7 @@ public class NewMinecartBehavior extends MinecartBehavior { + private Vec3 calculateBoostTrackSpeed(Vec3 velocity, BlockPos railPos, BlockState railState) { + if (railState.is(Blocks.POWERED_RAIL) && (Boolean) railState.getValue(PoweredRailBlock.POWERED)) { + if (velocity.length() > 0.01D) { +- return velocity.normalize().scale(velocity.length() + 0.06D); ++ return velocity.normalize().scale(velocity.length() + this.level().purpurConfig.poweredRailBoostModifier); // Purpur + } else { + Vec3 vec3d1 = this.minecart.getRedstoneDirection(railPos); + +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java b/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java +index cf871c174091139c8ad1affb84f98fcd74b60dee..ca1a2e8b32bc8730e7bdb44820696b2c4d1063d1 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java +@@ -310,9 +310,9 @@ public class OldMinecartBehavior extends MinecartBehavior { + vec3d5 = this.getDeltaMovement(); + d17 = vec3d5.horizontalDistance(); + if (d17 > 0.01D) { +- double d19 = 0.06D; ++ double d19 = world.purpurConfig.poweredRailBoostModifier; // Purpur + +- this.setDeltaMovement(vec3d5.add(vec3d5.x / d17 * 0.06D, 0.0D, vec3d5.z / d17 * 0.06D)); ++ this.setDeltaMovement(vec3d5.add(vec3d5.x / d17 * world.purpurConfig.poweredRailBoostModifier, 0.0D, vec3d5.z / d17 * world.purpurConfig.poweredRailBoostModifier)); // Purpur + } else { + Vec3 vec3d6 = this.getDeltaMovement(); + double d20 = vec3d6.x; +diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +index 6994e136f188ae11a77a691d05dc7355906544e5..0c52f8486f59eaca46309b31ac877f609e68b521 100644 +--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java ++++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +@@ -266,6 +266,7 @@ public class PurpurWorldConfig { + public boolean minecartControllableFallDamage = true; + public double minecartControllableBaseSpeed = 0.1D; + public Map minecartControllableBlockSpeeds = new HashMap<>(); ++ public double poweredRailBoostModifier = 0.06; + private void minecartSettings() { + if (PurpurConfig.version < 12) { + boolean oldBool = getBoolean("gameplay-mechanics.controllable-minecarts.place-anywhere", minecartPlaceAnywhere); +@@ -318,6 +319,7 @@ public class PurpurWorldConfig { + set("gameplay-mechanics.minecart.controllable.block-speed.grass_block", 0.3D); + set("gameplay-mechanics.minecart.controllable.block-speed.stone", 0.5D); + } ++ poweredRailBoostModifier = getDouble("gameplay-mechanics.minecart.powered-rail.boost-modifier", poweredRailBoostModifier); + } + + public boolean catSpawning; diff --git a/patches/unapplied-server/0163-Add-config-change-multiplier-critical-damage-value.patch b/patches/server/0159-Add-config-change-multiplier-critical-damage-value.patch similarity index 85% rename from patches/unapplied-server/0163-Add-config-change-multiplier-critical-damage-value.patch rename to patches/server/0159-Add-config-change-multiplier-critical-damage-value.patch index 02a0631b25..5ee256a355 100644 --- a/patches/unapplied-server/0163-Add-config-change-multiplier-critical-damage-value.patch +++ b/patches/server/0159-Add-config-change-multiplier-critical-damage-value.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config change multiplier critical damage value diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 33c1b2b387e7412a001841d1bcbb3966c188c1a3..40cf2eb78b02adc15e44189021005f147e00185c 100644 +index 00b3e300c0d43f7791c9d5f83a7901304f6464f5..e755a472385fcc699ae8fa1e56370c4176152ff6 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1348,7 +1348,7 @@ public abstract class Player extends LivingEntity { +@@ -1305,7 +1305,7 @@ public abstract class Player extends LivingEntity { flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits if (flag2) { damagesource = damagesource.critical(true); // Paper start - critical damage API @@ -18,10 +18,10 @@ index 33c1b2b387e7412a001841d1bcbb3966c188c1a3..40cf2eb78b02adc15e44189021005f14 float f3 = f + f1; diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 7d59c418f583d7247868595a2b00c2328c351e30..ca337c301190ecebdbae2e353785352c178bca96 100644 +index 0c52f8486f59eaca46309b31ac877f609e68b521..920964b0f6c91c9d49ea3c73351c1d5a0e3e2acd 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -365,6 +365,7 @@ public class PurpurWorldConfig { +@@ -363,6 +363,7 @@ public class PurpurWorldConfig { public boolean creativeOnePunch = false; public boolean playerSleepNearMonsters = false; public boolean playersSkipNight = true; @@ -29,7 +29,7 @@ index 7d59c418f583d7247868595a2b00c2328c351e30..ca337c301190ecebdbae2e353785352c private void playerSettings() { if (PurpurConfig.version < 19) { boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer); -@@ -384,6 +385,7 @@ public class PurpurWorldConfig { +@@ -382,6 +383,7 @@ public class PurpurWorldConfig { creativeOnePunch = getBoolean("gameplay-mechanics.player.one-punch-in-creative", creativeOnePunch); playerSleepNearMonsters = getBoolean("gameplay-mechanics.player.sleep-ignore-nearby-mobs", playerSleepNearMonsters); playersSkipNight = getBoolean("gameplay-mechanics.player.can-skip-night", playersSkipNight); diff --git a/patches/unapplied-server/0164-Option-to-disable-dragon-egg-teleporting.patch b/patches/server/0160-Option-to-disable-dragon-egg-teleporting.patch similarity index 87% rename from patches/unapplied-server/0164-Option-to-disable-dragon-egg-teleporting.patch rename to patches/server/0160-Option-to-disable-dragon-egg-teleporting.patch index 2295d5b2cf..944a7936ce 100644 --- a/patches/unapplied-server/0164-Option-to-disable-dragon-egg-teleporting.patch +++ b/patches/server/0160-Option-to-disable-dragon-egg-teleporting.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to disable dragon egg teleporting diff --git a/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java b/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java -index fbe15cdd5b9bca2ab4b1e871abbbdbff49ade8a4..23d113842bf774bdc74e0dffcc97b642bc8684f1 100644 +index 30d15686b1a81de7ac28feb0c6188eb007c6f2fd..b6799db00e157892dd4339a01d2ca36092c8e491 100644 --- a/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java @@ -48,8 +48,8 @@ public class DragonEggBlock extends FallingBlock { @@ -19,10 +19,10 @@ index fbe15cdd5b9bca2ab4b1e871abbbdbff49ade8a4..23d113842bf774bdc74e0dffcc97b642 BlockPos blockposition1 = pos.offset(world.random.nextInt(16) - world.random.nextInt(16), world.random.nextInt(8) - world.random.nextInt(8), world.random.nextInt(16) - world.random.nextInt(16)); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index ca337c301190ecebdbae2e353785352c178bca96..e52308a81158014fadbc486604ae54a232d2a4b0 100644 +index 920964b0f6c91c9d49ea3c73351c1d5a0e3e2acd..7109c4733ffa658d0221aa2064660844968807ff 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -497,6 +497,11 @@ public class PurpurWorldConfig { +@@ -495,6 +495,11 @@ public class PurpurWorldConfig { }); } diff --git a/patches/unapplied-server/0165-Config-for-unverified-username-message.patch b/patches/server/0161-Config-for-unverified-username-message.patch similarity index 94% rename from patches/unapplied-server/0165-Config-for-unverified-username-message.patch rename to patches/server/0161-Config-for-unverified-username-message.patch index 60f9bf2eb4..4a191d57ba 100644 --- a/patches/unapplied-server/0165-Config-for-unverified-username-message.patch +++ b/patches/server/0161-Config-for-unverified-username-message.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Config for unverified username message diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 40638b439966619e9c70a18a32abd95b2178fe9f..19d3423644a6a394743c09eb6935bb7633a329a2 100644 +index 033755682c61c889723c3669b5cff4de147f637e..16069b9cbf6c7679c28a2e9a54e77d23cd10e541 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -322,7 +322,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -18,7 +18,7 @@ index 40638b439966619e9c70a18a32abd95b2178fe9f..19d3423644a6a394743c09eb6935bb76 } } catch (AuthenticationUnavailableException authenticationunavailableexception) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 82e79211ec48578dad18e590ab1f9b58ae024c7c..35d86953ea87c5977acf1c83c2071bc622996510 100644 +index 881f3621233834aca8c8d5381e41d2a3fc9237da..a106b462b3739ecb19db991faffc348f60ff03df 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -186,6 +186,7 @@ public class PurpurConfig { diff --git a/patches/unapplied-server/0166-Make-anvil-cumulative-cost-configurable.patch b/patches/server/0162-Make-anvil-cumulative-cost-configurable.patch similarity index 93% rename from patches/unapplied-server/0166-Make-anvil-cumulative-cost-configurable.patch rename to patches/server/0162-Make-anvil-cumulative-cost-configurable.patch index c7c61dc7b1..b4d3d0abb1 100644 --- a/patches/unapplied-server/0166-Make-anvil-cumulative-cost-configurable.patch +++ b/patches/server/0162-Make-anvil-cumulative-cost-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make anvil cumulative cost configurable diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index 29e54876c22739f45565cd91bcbd76612e8bfad1..bd146be65c558dcd388359081e2625c4f5fbdc79 100644 +index e9c17953a3767e03e528ed93b10fb42626fff118..f8476a8fb38897af0dd63bfb20276ac1c4bbd4f0 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -@@ -400,7 +400,7 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -406,7 +406,7 @@ public class AnvilMenu extends ItemCombinerMenu { } public static int calculateIncreasedRepairCost(int cost) { diff --git a/patches/server/0163-Bee-can-work-when-raining-or-at-night.patch b/patches/server/0163-Bee-can-work-when-raining-or-at-night.patch new file mode 100644 index 0000000000..c5bd60c80d --- /dev/null +++ b/patches/server/0163-Bee-can-work-when-raining-or-at-night.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: DoctaEnkoda +Date: Thu, 27 May 2021 06:46:30 +0200 +Subject: [PATCH] Bee can work when raining or at night + + +diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java +index d47e5f774567aa4710686430b66eb1409c2f0c97..8caee835f524d23d061ff73d9fb609482ed57505 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java +@@ -426,7 +426,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { + } + + public static boolean isNightOrRaining(Level world) { +- return world.dimensionType().hasSkyLight() && (world.isNight() || world.isRaining()); ++ return world.dimensionType().hasSkyLight() && ((world.isNight() && !world.purpurConfig.beeCanWorkAtNight) || (world.isRaining() && !world.purpurConfig.beeCanWorkInRain)); // Purpur + } + + public void setStayOutOfHiveCountdown(int cannotEnterHiveTicks) { +diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +index 7109c4733ffa658d0221aa2064660844968807ff..ed5c6b053bea67350d067b8ed69312b1a6273332 100644 +--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java ++++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +@@ -746,6 +746,8 @@ public class PurpurWorldConfig { + public double beeScale = 1.0D; + public int beeBreedingTicks = 6000; + public boolean beeTakeDamageFromWater = false; ++ public boolean beeCanWorkAtNight = false; ++ public boolean beeCanWorkInRain = false; + private void beeSettings() { + beeRidable = getBoolean("mobs.bee.ridable", beeRidable); + beeRidableInWater = getBoolean("mobs.bee.ridable-in-water", beeRidableInWater); +@@ -760,6 +762,8 @@ public class PurpurWorldConfig { + beeScale = Mth.clamp(getDouble("mobs.bee.attributes.scale", beeScale), 0.0625D, 16.0D); + beeBreedingTicks = getInt("mobs.bee.breeding-delay-ticks", beeBreedingTicks); + beeTakeDamageFromWater = getBoolean("mobs.bee.takes-damage-from-water", beeTakeDamageFromWater); ++ beeCanWorkAtNight = getBoolean("mobs.bee.can-work-at-night", beeCanWorkAtNight); ++ beeCanWorkInRain = getBoolean("mobs.bee.can-work-in-rain", beeCanWorkInRain); + } + + public boolean blazeRidable = false; diff --git a/patches/unapplied-server/0168-API-for-any-mob-to-burn-daylight.patch b/patches/server/0164-API-for-any-mob-to-burn-daylight.patch similarity index 88% rename from patches/unapplied-server/0168-API-for-any-mob-to-burn-daylight.patch rename to patches/server/0164-API-for-any-mob-to-burn-daylight.patch index e13a4589b6..4e194f792c 100644 --- a/patches/unapplied-server/0168-API-for-any-mob-to-burn-daylight.patch +++ b/patches/server/0164-API-for-any-mob-to-burn-daylight.patch @@ -6,10 +6,10 @@ Subject: [PATCH] API for any mob to burn daylight Co-authored by: Encode42 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 657980c6c82b6a50ee9874f4aeb483b40dc24247..338c2afa277178b3d4d667142799f015c7b97cd0 100644 +index f3769da2422d98dec32ba252bde5d9467f1bd84f..d2f2301cff71b8ce64b803dadcb09610e8a2a289 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -559,6 +559,22 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -617,6 +617,22 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Purpur end @@ -33,10 +33,10 @@ index 657980c6c82b6a50ee9874f4aeb483b40dc24247..338c2afa277178b3d4d667142799f015 this.id = Entity.ENTITY_COUNTER.incrementAndGet(); this.passengers = ImmutableList.of(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b0d9f432eb9ebaf88196de4f1329ef530b422ca0..c8e5162e3494f221ebbf538d7416c8508358546d 100644 +index e937eb4e89bf08e3fee8ea2ca0643b0206964de1..5bc3556d437670801f5afda368c5d0e334869f33 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -285,6 +285,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -299,6 +299,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API @@ -44,7 +44,7 @@ index b0d9f432eb9ebaf88196de4f1329ef530b422ca0..c8e5162e3494f221ebbf538d7416c850 @Override public float getBukkitYaw() { -@@ -816,6 +817,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -841,6 +842,7 @@ public abstract class LivingEntity extends Entity implements Attackable { dataresult.resultOrPartial(logger::error).ifPresent((nbtbase) -> { nbt.put("Brain", nbtbase); }); @@ -52,7 +52,7 @@ index b0d9f432eb9ebaf88196de4f1329ef530b422ca0..c8e5162e3494f221ebbf538d7416c850 } @Override -@@ -904,6 +906,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -929,6 +931,11 @@ public abstract class LivingEntity extends Entity implements Attackable { this.brain = this.makeBrain(new Dynamic(NbtOps.INSTANCE, nbt.get("Brain"))); } @@ -64,8 +64,8 @@ index b0d9f432eb9ebaf88196de4f1329ef530b422ca0..c8e5162e3494f221ebbf538d7416c850 } // CraftBukkit start -@@ -3661,6 +3668,34 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.hurt(this.damageSources().drown(), 1.0F); +@@ -3756,6 +3763,34 @@ public abstract class LivingEntity extends Entity implements Attackable { + } } + // Purpur start - copied from Zombie - API for any mob to burn daylight @@ -100,10 +100,10 @@ index b0d9f432eb9ebaf88196de4f1329ef530b422ca0..c8e5162e3494f221ebbf538d7416c850 public boolean isSensitiveToWater() { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 70ace6f2a42c0d4181cb22a08dd923bd77c08295..518968c03e4e7ae99c2e40f6164c89ad27bad697 100644 +index bc2beee267f535e23bd804d415019bab5ee2fd88..da1aefc4cdf2bca8e91c6c7833c24f3f0923f552 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1788,17 +1788,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1770,17 +1770,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void playAttackSound() {} public boolean isSunBurnTick() { @@ -124,10 +124,10 @@ index 70ace6f2a42c0d4181cb22a08dd923bd77c08295..518968c03e4e7ae99c2e40f6164c89ad @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -index 5c1aa5859ac411098054be9f52bac0860ee667a5..1d06c612eaba8b595fa3d094577f700989d1e224 100644 +index cf8422f7b9234a16f4537dfd212c55ded92cb1aa..bbe4c1cb4244ab813ef7d56c46c3ae62701c4824 100644 --- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -@@ -66,6 +66,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo +@@ -68,6 +68,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo protected AbstractSkeleton(EntityType type, Level world) { super(type, world); this.reassessWeaponGoal(); @@ -135,7 +135,7 @@ index 5c1aa5859ac411098054be9f52bac0860ee667a5..1d06c612eaba8b595fa3d094577f7009 } @Override -@@ -96,37 +97,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo +@@ -98,37 +99,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo abstract SoundEvent getStepSound(); // Paper start - shouldBurnInDay API @@ -175,7 +175,7 @@ index 5c1aa5859ac411098054be9f52bac0860ee667a5..1d06c612eaba8b595fa3d094577f7009 super.aiStep(); } -@@ -241,7 +219,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo +@@ -245,7 +223,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo super.readAdditionalSaveData(nbt); this.reassessWeaponGoal(); // Paper start - shouldBurnInDay API @@ -184,7 +184,7 @@ index 5c1aa5859ac411098054be9f52bac0860ee667a5..1d06c612eaba8b595fa3d094577f7009 this.shouldBurnInDay = nbt.getBoolean("Paper.ShouldBurnInDay"); } // Paper end - shouldBurnInDay API -@@ -251,7 +229,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo +@@ -255,7 +233,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo @Override public void addAdditionalSaveData(CompoundTag nbt) { super.addAdditionalSaveData(nbt); @@ -194,10 +194,10 @@ index 5c1aa5859ac411098054be9f52bac0860ee667a5..1d06c612eaba8b595fa3d094577f7009 // Paper end - shouldBurnInDay API diff --git a/src/main/java/net/minecraft/world/entity/monster/Husk.java b/src/main/java/net/minecraft/world/entity/monster/Husk.java -index cb96bd5769159e6c25968673ea07cd6d107cff46..cbfb5bf945b747328746d21395e66d523c268468 100644 +index 78e95f15de02cc0b2f2c6d71bf6c10828986c6f4..324fca775bacd06dcd521ce4b33d4f7d33270d5a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Husk.java +++ b/src/main/java/net/minecraft/world/entity/monster/Husk.java -@@ -20,6 +20,7 @@ public class Husk extends Zombie { +@@ -21,6 +21,7 @@ public class Husk extends Zombie { public Husk(EntityType type, Level world) { super(type, world); @@ -205,7 +205,7 @@ index cb96bd5769159e6c25968673ea07cd6d107cff46..cbfb5bf945b747328746d21395e66d52 } // Purpur start -@@ -75,7 +76,7 @@ public class Husk extends Zombie { +@@ -76,7 +77,7 @@ public class Husk extends Zombie { @Override public boolean isSunSensitive() { @@ -215,10 +215,10 @@ index cb96bd5769159e6c25968673ea07cd6d107cff46..cbfb5bf945b747328746d21395e66d52 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java -index 554e01cf4fb3b15549c8c381274014c4735e08c6..f6b2e0797554baa3bc74e886e22d5bac67c424f6 100644 +index 2dc44d3b2609fef26925f2a4a21e0a8bdd14d24a..8f3408b60fce19680e3848b448a7eaddf96e91da 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java -@@ -59,6 +59,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -60,6 +60,7 @@ public class Phantom extends FlyingMob implements Enemy { this.xpReward = 5; this.moveControl = new Phantom.PhantomMoveControl(this); this.lookControl = new Phantom.PhantomLookControl(this, this); @@ -226,7 +226,7 @@ index 554e01cf4fb3b15549c8c381274014c4735e08c6..f6b2e0797554baa3bc74e886e22d5bac } // Purpur start -@@ -247,15 +248,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -248,15 +249,7 @@ public class Phantom extends FlyingMob implements Enemy { @Override public void aiStep() { @@ -243,7 +243,7 @@ index 554e01cf4fb3b15549c8c381274014c4735e08c6..f6b2e0797554baa3bc74e886e22d5bac super.aiStep(); } -@@ -283,7 +276,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -279,7 +272,7 @@ public class Phantom extends FlyingMob implements Enemy { if (nbt.hasUUID("Paper.SpawningEntity")) { this.spawningEntity = nbt.getUUID("Paper.SpawningEntity"); } @@ -252,7 +252,7 @@ index 554e01cf4fb3b15549c8c381274014c4735e08c6..f6b2e0797554baa3bc74e886e22d5bac this.shouldBurnInDay = nbt.getBoolean("Paper.ShouldBurnInDay"); } // Paper end -@@ -300,7 +293,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -296,7 +289,7 @@ public class Phantom extends FlyingMob implements Enemy { if (this.spawningEntity != null) { nbt.putUUID("Paper.SpawningEntity", this.spawningEntity); } @@ -279,10 +279,10 @@ index 554e01cf4fb3b15549c8c381274014c4735e08c6..f6b2e0797554baa3bc74e886e22d5bac // Paper end diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 990daa4f12ed7fb9a1ab40443c7f68bca4534626..4e7b67e5d6b26d1d0523dfed7f0d029b363fb0ef 100644 +index d79eb7bd6d38a4f1aee89cf0cf331a126351e767..b34dec421adc3ce56c0720a839a43ce42faeefaf 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -97,11 +97,12 @@ public class Zombie extends Monster { +@@ -99,11 +99,12 @@ public class Zombie extends Monster { private int inWaterTime; public int conversionTime; // private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field // Paper - remove anti tick skipping measures / wall time @@ -296,7 +296,7 @@ index 990daa4f12ed7fb9a1ab40443c7f68bca4534626..4e7b67e5d6b26d1d0523dfed7f0d029b } public Zombie(Level world) { -@@ -295,32 +296,7 @@ public class Zombie extends Monster { +@@ -293,32 +294,7 @@ public class Zombie extends Monster { @Override public void aiStep() { @@ -330,15 +330,15 @@ index 990daa4f12ed7fb9a1ab40443c7f68bca4534626..4e7b67e5d6b26d1d0523dfed7f0d029b super.aiStep(); } -@@ -358,6 +334,7 @@ public class Zombie extends Monster { - +@@ -378,6 +354,7 @@ public class Zombie extends Monster { + // CraftBukkit end } + public boolean shouldBurnInDay() { return this.isSunSensitive(); } // Purpur - for ABI compatibility - API for any mob to burn daylight public boolean isSunSensitive() { return this.shouldBurnInDay; // Paper - Add more Zombie API } -@@ -486,7 +463,7 @@ public class Zombie extends Monster { +@@ -516,7 +493,7 @@ public class Zombie extends Monster { nbt.putBoolean("CanBreakDoors", this.canBreakDoors()); nbt.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); nbt.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); @@ -347,7 +347,7 @@ index 990daa4f12ed7fb9a1ab40443c7f68bca4534626..4e7b67e5d6b26d1d0523dfed7f0d029b } @Override -@@ -499,7 +476,7 @@ public class Zombie extends Monster { +@@ -529,7 +506,7 @@ public class Zombie extends Monster { this.startUnderWaterConversion(nbt.getInt("DrownedConversionTime")); } // Paper start - Add more Zombie API @@ -357,10 +357,10 @@ index 990daa4f12ed7fb9a1ab40443c7f68bca4534626..4e7b67e5d6b26d1d0523dfed7f0d029b } // Paper end - Add more Zombie API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index af3ab1eb9af64605203e7bb671ff08a38be9e6a6..7b7a58039eb1a288262228444712c84d6e2aef24 100644 +index f68c1d6c7003202c4d107663b9c60c2fb1c95455..b5885d16cd3371d34bd031bd00a22a0ba6db6509 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -86,6 +86,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -87,6 +87,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { this.entityType = CraftEntityType.minecraftToBukkit(entity.getType()); } @@ -375,10 +375,10 @@ index af3ab1eb9af64605203e7bb671ff08a38be9e6a6..7b7a58039eb1a288262228444712c84d Preconditions.checkArgument(entity != null, "Unknown entity"); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 4750df7354ccb5afd0910efe0415f3a2eb19a546..0a3da3d35cd6b41003692d968b77384e7460ca97 100644 +index d0c409f4efad289e3e325f44b500fc72589d89d4..bf84c9664ca6d6c3d862e592c39bcc59374b63fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1192,4 +1192,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1211,4 +1211,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return this.getHandle().canUseSlot(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot)); } // Paper end - Expose canUseSlot diff --git a/patches/unapplied-server/0169-Config-MobEffect-by-world.patch b/patches/server/0165-Config-MobEffect-by-world.patch similarity index 73% rename from patches/unapplied-server/0169-Config-MobEffect-by-world.patch rename to patches/server/0165-Config-MobEffect-by-world.patch index 1150f8d59d..cc8d146a86 100644 --- a/patches/unapplied-server/0169-Config-MobEffect-by-world.patch +++ b/patches/server/0165-Config-MobEffect-by-world.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Config MobEffect by world diff --git a/src/main/java/net/minecraft/world/effect/HungerMobEffect.java b/src/main/java/net/minecraft/world/effect/HungerMobEffect.java -index a476b56ed98d0a1afc6a396ce29424df78f24ada..5119ff3414fbd9a1ae0a8db0fd15bd3c57c8e148 100644 +index 11d1ee8fae7670f02cb3f5d57f4774dbde77f48c..88cf1353892a7ead4e0f16822216b151726ac0e4 100644 --- a/src/main/java/net/minecraft/world/effect/HungerMobEffect.java +++ b/src/main/java/net/minecraft/world/effect/HungerMobEffect.java -@@ -12,7 +12,7 @@ class HungerMobEffect extends MobEffect { +@@ -13,7 +13,7 @@ class HungerMobEffect extends MobEffect { @Override - public boolean applyEffectTick(LivingEntity entity, int amplifier) { + public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) { if (entity instanceof Player entityhuman) { - entityhuman.causeFoodExhaustion(0.005F * (float) (amplifier + 1), org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.HUNGER_EFFECT); // CraftBukkit - EntityExhaustionEvent + entityhuman.causeFoodExhaustion(entity.level().purpurConfig.humanHungerExhaustionAmount * (float) (amplifier + 1), org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.HUNGER_EFFECT); // CraftBukkit - EntityExhaustionEvent // Purpur @@ -18,27 +18,27 @@ index a476b56ed98d0a1afc6a396ce29424df78f24ada..5119ff3414fbd9a1ae0a8db0fd15bd3c return true; diff --git a/src/main/java/net/minecraft/world/effect/PoisonMobEffect.java b/src/main/java/net/minecraft/world/effect/PoisonMobEffect.java -index 3e7a703632251e0a5234259e3702b58b332e5ef0..f2cc43fbccb5d2ba012b350268065c2cfe014faf 100644 +index 83c6d17f75c3f0b531bdfd5b5f9bc2a5b3eb7a2c..df43c007e7b9fee58b2cd0892b966ce88cb1f890 100644 --- a/src/main/java/net/minecraft/world/effect/PoisonMobEffect.java +++ b/src/main/java/net/minecraft/world/effect/PoisonMobEffect.java -@@ -10,8 +10,8 @@ class PoisonMobEffect extends MobEffect { +@@ -11,8 +11,8 @@ class PoisonMobEffect extends MobEffect { @Override - public boolean applyEffectTick(LivingEntity entity, int amplifier) { + public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) { - if (entity.getHealth() > 1.0F) { -- entity.hurt(entity.damageSources().poison(), 1.0F); // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON +- entity.hurtServer(world, entity.damageSources().poison(), 1.0F); // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON + if (entity.getHealth() > entity.level().purpurConfig.entityMinimalHealthPoison) { // Purpur -+ entity.hurt(entity.damageSources().poison(), entity.level().purpurConfig.entityPoisonDegenerationAmount); // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON // Purpur ++ entity.hurtServer(world, entity.damageSources().poison(), entity.level().purpurConfig.entityPoisonDegenerationAmount); // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON // Purpur } return true; diff --git a/src/main/java/net/minecraft/world/effect/RegenerationMobEffect.java b/src/main/java/net/minecraft/world/effect/RegenerationMobEffect.java -index 4dba3e813e054951cbfbe0b323c1f5d973469cc0..426f61d55b9692cf085368df4e4df6f6997aa420 100644 +index b43e573e91d1f1b407774bb2d60ee5f099f171e7..25aa932fc03eeebc5aabca6c5eae0cbfc8ad8396 100644 --- a/src/main/java/net/minecraft/world/effect/RegenerationMobEffect.java +++ b/src/main/java/net/minecraft/world/effect/RegenerationMobEffect.java -@@ -11,7 +11,7 @@ class RegenerationMobEffect extends MobEffect { +@@ -12,7 +12,7 @@ class RegenerationMobEffect extends MobEffect { @Override - public boolean applyEffectTick(LivingEntity entity, int amplifier) { + public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) { if (entity.getHealth() < entity.getMaxHealth()) { - entity.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC_REGEN); // CraftBukkit + entity.heal(entity.level().purpurConfig.entityHealthRegenAmount, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC_REGEN); // CraftBukkit // Purpur @@ -46,10 +46,10 @@ index 4dba3e813e054951cbfbe0b323c1f5d973469cc0..426f61d55b9692cf085368df4e4df6f6 return true; diff --git a/src/main/java/net/minecraft/world/effect/SaturationMobEffect.java b/src/main/java/net/minecraft/world/effect/SaturationMobEffect.java -index 7b415dca88f50dc472fe4be96e5ef0996f117913..2bb872f29350d15db46b32c686aef78fc1b6fa29 100644 +index 98b74649a667fb9b10afef0ba5383a73022d8c71..837bdc7d6bd4e05b0deded829c678c86ae3d79d5 100644 --- a/src/main/java/net/minecraft/world/effect/SaturationMobEffect.java +++ b/src/main/java/net/minecraft/world/effect/SaturationMobEffect.java -@@ -20,7 +20,7 @@ class SaturationMobEffect extends InstantenousMobEffect { +@@ -21,7 +21,7 @@ class SaturationMobEffect extends InstantenousMobEffect { int oldFoodLevel = entityhuman.getFoodData().foodLevel; org.bukkit.event.entity.FoodLevelChangeEvent event = CraftEventFactory.callFoodLevelChangeEvent(entityhuman, amplifier + 1 + oldFoodLevel); if (!event.isCancelled()) { @@ -59,23 +59,23 @@ index 7b415dca88f50dc472fe4be96e5ef0996f117913..2bb872f29350d15db46b32c686aef78f ((CraftPlayer) entityhuman.getBukkitEntity()).sendHealthUpdate(); diff --git a/src/main/java/net/minecraft/world/effect/WitherMobEffect.java b/src/main/java/net/minecraft/world/effect/WitherMobEffect.java -index f43bf280999ff3860cc702def50cc62b131eb1bd..66d9e99a351f5fc6cf58be3bee4397d92c932d64 100644 +index 303cefba51e19ac43b1f6188ad64ef480715ebaf..98ec88751b3e71c2e7aad633096b7f41608c0b33 100644 --- a/src/main/java/net/minecraft/world/effect/WitherMobEffect.java +++ b/src/main/java/net/minecraft/world/effect/WitherMobEffect.java -@@ -9,7 +9,7 @@ class WitherMobEffect extends MobEffect { +@@ -10,7 +10,7 @@ class WitherMobEffect extends MobEffect { @Override - public boolean applyEffectTick(LivingEntity entity, int amplifier) { -- entity.hurt(entity.damageSources().wither(), 1.0F); -+ entity.hurt(entity.damageSources().wither(), entity.level().purpurConfig.entityWitherDegenerationAmount); // Purpur + public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) { +- entity.hurtServer(world, entity.damageSources().wither(), 1.0F); ++ entity.hurtServer(world, entity.damageSources().wither(), entity.level().purpurConfig.entityWitherDegenerationAmount); // Purpur return true; } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 722a3a1f222536995a3da0a4ad1f85db590a61c0..68d6c2504990f2664518a589f916f41bc54f61bb 100644 +index ed5c6b053bea67350d067b8ed69312b1a6273332..0ac0a4b0e781af5877f0c7ad4a8398763d9f4b7c 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -324,6 +324,21 @@ public class PurpurWorldConfig { +@@ -322,6 +322,21 @@ public class PurpurWorldConfig { poweredRailBoostModifier = getDouble("gameplay-mechanics.minecart.powered-rail.boost-modifier", poweredRailBoostModifier); } diff --git a/patches/unapplied-server/0170-Beacon-Activation-Range-Configurable.patch b/patches/server/0166-Beacon-Activation-Range-Configurable.patch similarity index 90% rename from patches/unapplied-server/0170-Beacon-Activation-Range-Configurable.patch rename to patches/server/0166-Beacon-Activation-Range-Configurable.patch index cb3fe8652a..e110259312 100644 --- a/patches/unapplied-server/0170-Beacon-Activation-Range-Configurable.patch +++ b/patches/server/0166-Beacon-Activation-Range-Configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Beacon Activation Range Configurable diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 814e70f558d7a6186233da0ff86c94c95d390e09..d1fb77d83d48183a9a37dbeec7bb0fda623d7e9b 100644 +index 0e0d178f2793ab014358f534c8dc53218b89f083..fbc6b0099af34b0247f6144a9cef020f9ccddeef 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -92,6 +92,16 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name @@ -26,10 +26,10 @@ index 814e70f558d7a6186233da0ff86c94c95d390e09..d1fb77d83d48183a9a37dbeec7bb0fda } else { return effectRange; diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 68d6c2504990f2664518a589f916f41bc54f61bb..2a3bd1593d440b2bece131ce15321fe0a4b92553 100644 +index 0ac0a4b0e781af5877f0c7ad4a8398763d9f4b7c..0adfc605365b5671dadebdd7143ba92417e5bb22 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -464,6 +464,17 @@ public class PurpurWorldConfig { +@@ -462,6 +462,17 @@ public class PurpurWorldConfig { anvilColorsUseMiniMessage = getBoolean("blocks.anvil.use-mini-message", anvilColorsUseMiniMessage); } diff --git a/patches/unapplied-server/0171-Make-lightning-rod-range-configurable.patch b/patches/server/0167-Make-lightning-rod-range-configurable.patch similarity index 91% rename from patches/unapplied-server/0171-Make-lightning-rod-range-configurable.patch rename to patches/server/0167-Make-lightning-rod-range-configurable.patch index 37aabb0f50..2561012884 100644 --- a/patches/unapplied-server/0171-Make-lightning-rod-range-configurable.patch +++ b/patches/server/0167-Make-lightning-rod-range-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make lightning rod range configurable diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 40a5107d37e908d13bd0307fc41d9a6e3faf1217..277a0b6f38b1ce00fd06066b43ac634f80ab441a 100644 +index 29b8a57477032c85bc498e90af4bfb739926d03c..8680572c838dbad0ea13afe041e43f58b2deebc2 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1021,7 +1021,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -1069,7 +1069,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe return holder.is(PoiTypes.LIGHTNING_ROD); }, (blockposition1) -> { return blockposition1.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, blockposition1.getX(), blockposition1.getZ()) - 1; diff --git a/patches/unapplied-server/0172-Burp-delay-burp-after-eating-food-fills-hunger-bar-c.patch b/patches/server/0168-Burp-delay-burp-after-eating-food-fills-hunger-bar-c.patch similarity index 67% rename from patches/unapplied-server/0172-Burp-delay-burp-after-eating-food-fills-hunger-bar-c.patch rename to patches/server/0168-Burp-delay-burp-after-eating-food-fills-hunger-bar-c.patch index 9d77f86cf9..14fecae656 100644 --- a/patches/unapplied-server/0172-Burp-delay-burp-after-eating-food-fills-hunger-bar-c.patch +++ b/patches/server/0168-Burp-delay-burp-after-eating-food-fills-hunger-bar-c.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Burp delay, burp after eating food fills hunger bar diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 40cf2eb78b02adc15e44189021005f147e00185c..1552312aa9740c74533821594da7da705a6f5f70 100644 +index e755a472385fcc699ae8fa1e56370c4176152ff6..8852740d584ad4bafe14787572c2e238ddf2f584 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -198,6 +198,7 @@ public abstract class Player extends LivingEntity { @@ -30,21 +30,12 @@ index 40cf2eb78b02adc15e44189021005f147e00185c..1552312aa9740c74533821594da7da70 this.noPhysics = this.isSpectator(); if (this.isSpectator()) { this.setOnGround(false); -@@ -2376,7 +2383,7 @@ public abstract class Player extends LivingEntity { - public ItemStack eat(Level world, ItemStack stack, FoodProperties foodComponent) { - this.getFoodData().eat(stack, foodComponent); // CraftBukkit - this.awardStat(Stats.ITEM_USED.get(stack.getItem())); -- world.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F); -+ // world.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F); // Purpur - moved to tick() - if (this instanceof ServerPlayer) { - CriteriaTriggers.CONSUME_ITEM.trigger((ServerPlayer) this, stack); - } diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java -index bd3f78e6453cfe18aa3da38176b04d734d83bb4b..b702b7270fae8fafc39588fbc39b4e0014809047 100644 +index 6a686be6a69ae890d519a54ca099d4ba14e5b9e1..a1c2dfb9e2a6efe05389b0716c4d1d0f95311eea 100644 --- a/src/main/java/net/minecraft/world/food/FoodData.java +++ b/src/main/java/net/minecraft/world/food/FoodData.java -@@ -34,8 +34,10 @@ public class FoodData { - // CraftBukkit end +@@ -25,8 +25,10 @@ public class FoodData { + public FoodData() {} private void add(int nutrition, float saturation) { + int oldValue = this.foodLevel; // Purpur @@ -54,11 +45,24 @@ index bd3f78e6453cfe18aa3da38176b04d734d83bb4b..b702b7270fae8fafc39588fbc39b4e00 } public void eat(int food, float saturationModifier) { +diff --git a/src/main/java/net/minecraft/world/food/FoodProperties.java b/src/main/java/net/minecraft/world/food/FoodProperties.java +index 882b72799ae532f4e181214d5756ec024af223e2..9a3f2a95debcf8b94f7deb375922ea09b30aabab 100644 +--- a/src/main/java/net/minecraft/world/food/FoodProperties.java ++++ b/src/main/java/net/minecraft/world/food/FoodProperties.java +@@ -33,7 +33,7 @@ public record FoodProperties(int nutrition, float saturation, boolean canAlwaysE + world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), (SoundEvent) consumable.sound().value(), SoundSource.NEUTRAL, 1.0F, randomsource.triangle(1.0F, 0.4F)); + if (user instanceof Player entityhuman) { + entityhuman.getFoodData().eat(this, stack, (ServerPlayer) entityhuman); // CraftBukkit +- world.playSound((Player) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, Mth.randomBetween(randomsource, 0.9F, 1.0F)); ++ //world.playSound((Player) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, Mth.randomBetween(randomsource, 0.9F, 1.0F)); // Purpur - moved to Player#tick() + } + + } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 2a3bd1593d440b2bece131ce15321fe0a4b92553..a5bea4b6d19d84bbab2adda8c7ba3e5f65b817c0 100644 +index 0adfc605365b5671dadebdd7143ba92417e5bb22..b94017de09e67afbf5778867025d57e2cdf8efb8 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -381,6 +381,8 @@ public class PurpurWorldConfig { +@@ -379,6 +379,8 @@ public class PurpurWorldConfig { public boolean playerSleepNearMonsters = false; public boolean playersSkipNight = true; public double playerCriticalDamageMultiplier = 1.5D; @@ -67,7 +71,7 @@ index 2a3bd1593d440b2bece131ce15321fe0a4b92553..a5bea4b6d19d84bbab2adda8c7ba3e5f private void playerSettings() { if (PurpurConfig.version < 19) { boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer); -@@ -401,6 +403,8 @@ public class PurpurWorldConfig { +@@ -399,6 +401,8 @@ public class PurpurWorldConfig { playerSleepNearMonsters = getBoolean("gameplay-mechanics.player.sleep-ignore-nearby-mobs", playerSleepNearMonsters); playersSkipNight = getBoolean("gameplay-mechanics.player.can-skip-night", playersSkipNight); playerCriticalDamageMultiplier = getDouble("gameplay-mechanics.player.critical-damage-multiplier", playerCriticalDamageMultiplier); diff --git a/patches/unapplied-server/0173-Allow-player-join-full-server-by-permission.patch b/patches/server/0169-Allow-player-join-full-server-by-permission.patch similarity index 90% rename from patches/unapplied-server/0173-Allow-player-join-full-server-by-permission.patch rename to patches/server/0169-Allow-player-join-full-server-by-permission.patch index 0a7e836d5a..5a7d6b0d10 100644 --- a/patches/unapplied-server/0173-Allow-player-join-full-server-by-permission.patch +++ b/patches/server/0169-Allow-player-join-full-server-by-permission.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow player join full server by permission diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 338bf471d9214c77653eb69510b722b552e60172..c55f721a611dc215bcbf3f74f752b3bebfbe9ea4 100644 +index 44f1048b231e56fae00feb1bcf935c4f65508b69..a170b6b357987d6e1cb42a9b54a2b8d965395db6 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -748,7 +748,7 @@ public abstract class PlayerList { +@@ -705,7 +705,7 @@ public abstract class PlayerList { event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure } else { // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile) ? IChatBaseComponent.translatable("multiplayer.disconnect.server_full") : null; diff --git a/patches/unapplied-server/0174-Add-portal-permission-bypass.patch b/patches/server/0170-Add-portal-permission-bypass.patch similarity index 83% rename from patches/unapplied-server/0174-Add-portal-permission-bypass.patch rename to patches/server/0170-Add-portal-permission-bypass.patch index cdbef81e6c..ffa47d69ab 100644 --- a/patches/unapplied-server/0174-Add-portal-permission-bypass.patch +++ b/patches/server/0170-Add-portal-permission-bypass.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add portal permission bypass diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 1552312aa9740c74533821594da7da705a6f5f70..09e1faae9c22c1062e3de5257c82b2d156e65b4f 100644 +index 8852740d584ad4bafe14787572c2e238ddf2f584..098256932c2e637726e77bbfcd329f1a329c9969 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -199,6 +199,7 @@ public abstract class Player extends LivingEntity { @@ -17,20 +17,20 @@ index 1552312aa9740c74533821594da7da705a6f5f70..09e1faae9c22c1062e3de5257c82b2d1 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -index 971dd866fe5d6fcef573cb52582ccb7faf01b2f1..d579132d1afd5c2edb9356c5601584bca2357f8f 100644 +index 10e747edebd6463cdfcea592cec1c232d837f21b..02bcba52e28f757b59e2f384d5744834962870f0 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -129,7 +129,7 @@ public class NetherPortalBlock extends Block implements Portal { +@@ -137,7 +137,7 @@ public class NetherPortalBlock extends Block implements Portal { @Override public int getPortalTransitionTime(ServerLevel world, Entity entity) { if (entity instanceof Player entityhuman) { -- return Math.max(1, world.getGameRules().getInt(entityhuman.getAbilities().invulnerable ? GameRules.RULE_PLAYERS_NETHER_PORTAL_CREATIVE_DELAY : GameRules.RULE_PLAYERS_NETHER_PORTAL_DEFAULT_DELAY)); -+ return Math.max(1, entityhuman.canPortalInstant ? 1 : world.getGameRules().getInt(entityhuman.getAbilities().invulnerable ? GameRules.RULE_PLAYERS_NETHER_PORTAL_CREATIVE_DELAY : GameRules.RULE_PLAYERS_NETHER_PORTAL_DEFAULT_DELAY)); // Purpur +- return Math.max(0, world.getGameRules().getInt(entityhuman.getAbilities().invulnerable ? GameRules.RULE_PLAYERS_NETHER_PORTAL_CREATIVE_DELAY : GameRules.RULE_PLAYERS_NETHER_PORTAL_DEFAULT_DELAY)); ++ return Math.max(0, entityhuman.canPortalInstant ? 1 : world.getGameRules().getInt(entityhuman.getAbilities().invulnerable ? GameRules.RULE_PLAYERS_NETHER_PORTAL_CREATIVE_DELAY : GameRules.RULE_PLAYERS_NETHER_PORTAL_DEFAULT_DELAY)); // Purpur } else { return 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 7dcfb45c24d7743956be514c7d554e06aac77b3e..46856d2b7e24c5d223b7b1627ccb451749b183e7 100644 +index 4312290ad970f71e1dc25b707ab312c597a481a9..e0cbf2e2c17c87af23495e6365ff9378f7c861da 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -273,6 +273,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/patches/unapplied-server/0175-Shulker-spawn-from-bullet-options.patch b/patches/server/0171-Shulker-spawn-from-bullet-options.patch similarity index 90% rename from patches/unapplied-server/0175-Shulker-spawn-from-bullet-options.patch rename to patches/server/0171-Shulker-spawn-from-bullet-options.patch index c5c617566c..8325cf40a2 100644 --- a/patches/unapplied-server/0175-Shulker-spawn-from-bullet-options.patch +++ b/patches/server/0171-Shulker-spawn-from-bullet-options.patch @@ -13,10 +13,10 @@ Subject: [PATCH] Shulker spawn from bullet options (7 - 1) / 5.0 = 1.2 1.0 - 1.2 = -0.2 0% (6 other shulkers) diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java -index bd4f2297b2267ab99c0419417f37898dd943480b..6f1deb4d26c851ca99fbadf1eb5b7847eadbf25b 100644 +index 4a04ade0cfeac23afbac1a5ef7dfff0df2136191..79bf3d04fa2c7bcadfff08dc9a464e589866f7db 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java +++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java -@@ -511,12 +511,21 @@ public class Shulker extends AbstractGolem implements VariantHolder getVariant() { @@ -53,7 +53,7 @@ index bd4f2297b2267ab99c0419417f37898dd943480b..6f1deb4d26c851ca99fbadf1eb5b7847 @Nullable diff --git a/src/main/java/net/minecraft/world/item/DyeColor.java b/src/main/java/net/minecraft/world/item/DyeColor.java -index 0d04a0107bd1a8a2b9aeb4be55025cd554e8fb79..a050d76233e179a1456b83ccc02bb9a55d1cec84 100644 +index 79dc7cf5bfe92b4df21d164f39726dfe618331e4..6721432f9cdd11c9658c34f0ac407be217f9d276 100644 --- a/src/main/java/net/minecraft/world/item/DyeColor.java +++ b/src/main/java/net/minecraft/world/item/DyeColor.java @@ -103,4 +103,10 @@ public enum DyeColor implements StringRepresentable { @@ -68,10 +68,10 @@ index 0d04a0107bd1a8a2b9aeb4be55025cd554e8fb79..a050d76233e179a1456b83ccc02bb9a5 + // Purpur end } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index a5bea4b6d19d84bbab2adda8c7ba3e5f65b817c0..92cd2be5ce7d0a064cfa7f12802d4ffbd7e060d7 100644 +index b94017de09e67afbf5778867025d57e2cdf8efb8..798160f40deb31511d7d120e66a3464c68203ff3 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1980,6 +1980,11 @@ public class PurpurWorldConfig { +@@ -1976,6 +1976,11 @@ public class PurpurWorldConfig { public double shulkerMaxHealth = 30.0D; public double shulkerScale = 1.0D; public boolean shulkerTakeDamageFromWater = false; @@ -83,7 +83,7 @@ index a5bea4b6d19d84bbab2adda8c7ba3e5f65b817c0..92cd2be5ce7d0a064cfa7f12802d4ffb private void shulkerSettings() { shulkerRidable = getBoolean("mobs.shulker.ridable", shulkerRidable); shulkerRidableInWater = getBoolean("mobs.shulker.ridable-in-water", shulkerRidableInWater); -@@ -1992,6 +1997,11 @@ public class PurpurWorldConfig { +@@ -1988,6 +1993,11 @@ public class PurpurWorldConfig { shulkerMaxHealth = getDouble("mobs.shulker.attributes.max_health", shulkerMaxHealth); shulkerScale = Mth.clamp(getDouble("mobs.shulker.attributes.scale", shulkerScale), 0.0625D, Shulker.MAX_SCALE); shulkerTakeDamageFromWater = getBoolean("mobs.shulker.takes-damage-from-water", shulkerTakeDamageFromWater); diff --git a/patches/unapplied-server/0176-Eating-glow-berries-adds-glow-effect.patch b/patches/server/0172-Eating-glow-berries-adds-glow-effect.patch similarity index 80% rename from patches/unapplied-server/0176-Eating-glow-berries-adds-glow-effect.patch rename to patches/server/0172-Eating-glow-berries-adds-glow-effect.patch index 5149bb8ac5..9e10ff826b 100644 --- a/patches/unapplied-server/0176-Eating-glow-berries-adds-glow-effect.patch +++ b/patches/server/0172-Eating-glow-berries-adds-glow-effect.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Eating glow berries adds glow effect diff --git a/src/main/java/net/minecraft/world/item/Items.java b/src/main/java/net/minecraft/world/item/Items.java -index 4eef61323ba54f513e6f251ef7c804b2c91ff477..6b2235281dca67a80cb651e9f8e9bf2556979276 100644 +index bf7d12594375d5b252db540a6d669a6e6aca7de8..580bd63fdbf9555f867362d3c1f39f41fd750089 100644 --- a/src/main/java/net/minecraft/world/item/Items.java +++ b/src/main/java/net/minecraft/world/item/Items.java -@@ -1919,7 +1919,7 @@ public class Items { - "sweet_berries", new ItemNameBlockItem(Blocks.SWEET_BERRY_BUSH, new Item.Properties().food(Foods.SWEET_BERRIES)) +@@ -2104,7 +2104,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( -- "glow_berries", new ItemNameBlockItem(Blocks.CAVE_VINES, new Item.Properties().food(Foods.GLOW_BERRIES)) -+ "glow_berries", new org.purpurmc.purpur.item.GlowBerryItem(Blocks.CAVE_VINES, new Item.Properties().food(Foods.GLOW_BERRIES)) // Purpur +- "glow_berries", createBlockItemWithCustomItemName(Blocks.CAVE_VINES), new Item.Properties().food(Foods.GLOW_BERRIES) ++ "glow_berries", settings -> new org.purpurmc.purpur.item.GlowBerryItem(Blocks.CAVE_VINES, settings.useItemDescriptionPrefix()), new Item.Properties().food(Foods.GLOW_BERRIES) // Purpur ); public static final Item CAMPFIRE = registerBlock(Blocks.CAMPFIRE, settings -> settings.component(DataComponents.CONTAINER, ItemContainerContents.EMPTY)); public static final Item SOUL_CAMPFIRE = registerBlock( diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 92cd2be5ce7d0a064cfa7f12802d4ffbd7e060d7..d82bba5a4c729c69882354d9e3ca65b36a40c1b3 100644 +index 798160f40deb31511d7d120e66a3464c68203ff3..f9df0bc403a19f4ddedf95907928d9f3003804ab 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -213,6 +213,7 @@ public class PurpurWorldConfig { +@@ -211,6 +211,7 @@ public class PurpurWorldConfig { public int enderPearlCooldown = 20; public int enderPearlCooldownCreative = 20; public float enderPearlEndermiteChance = 0.05F; @@ -29,7 +29,7 @@ index 92cd2be5ce7d0a064cfa7f12802d4ffbd7e060d7..d82bba5a4c729c69882354d9e3ca65b3 private void itemSettings() { itemImmuneToCactus.clear(); getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> { -@@ -258,6 +259,7 @@ public class PurpurWorldConfig { +@@ -256,6 +257,7 @@ public class PurpurWorldConfig { enderPearlCooldown = getInt("gameplay-mechanics.item.ender-pearl.cooldown", enderPearlCooldown); enderPearlCooldownCreative = getInt("gameplay-mechanics.item.ender-pearl.creative-cooldown", enderPearlCooldownCreative); enderPearlEndermiteChance = (float) getDouble("gameplay-mechanics.item.ender-pearl.endermite-spawn-chance", enderPearlEndermiteChance); diff --git a/patches/unapplied-server/0177-Option-to-make-drowned-break-doors.patch b/patches/server/0173-Option-to-make-drowned-break-doors.patch similarity index 70% rename from patches/unapplied-server/0177-Option-to-make-drowned-break-doors.patch rename to patches/server/0173-Option-to-make-drowned-break-doors.patch index fa4d04a4d6..c29e6352e4 100644 --- a/patches/unapplied-server/0177-Option-to-make-drowned-break-doors.patch +++ b/patches/server/0173-Option-to-make-drowned-break-doors.patch @@ -5,31 +5,22 @@ Subject: [PATCH] Option to make drowned break doors diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java -index 370f1b76c002f7cecf596767db717da51b2990f8..994dee36ce3aad3a0ef6a06bcaf555bdd434a0cd 100644 +index 1f41e4a88fb41347b8b1ac6b3d1c454ad35ebfc4..ec00c6b2a8b6a5e0ef030d65f86d4a7d72dbeb21 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java +++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java -@@ -126,6 +126,7 @@ public class Drowned extends Zombie implements RangedAttackMob { - this.goalSelector.addGoal(2, new Drowned.DrownedAttackGoal(this, 1.0D, false)); - this.goalSelector.addGoal(5, new Drowned.DrownedGoToBeachGoal(this, 1.0D)); - this.goalSelector.addGoal(6, new Drowned.DrownedSwimUpGoal(this, 1.0D, this.level().getSeaLevel())); +@@ -127,6 +127,7 @@ 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())); + if (level().purpurConfig.drownedBreakDoors) this.goalSelector.addGoal(6, new net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal(this, 1.0D, true, 4, this::canBreakDoors)); - this.goalSelector.addGoal(7, new RandomStrollGoal(this, 1.0D)); - this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[]{Drowned.class})).setAlertOthers(ZombifiedPiglin.class)); - this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::okTarget)); -@@ -175,7 +176,7 @@ public class Drowned extends Zombie implements RangedAttackMob { - - @Override - public boolean supportsBreakDoorGoal() { -- return false; -+ return level().purpurConfig.drownedBreakDoors ? true : false; - } - - @Override + this.goalSelector.addGoal(7, new RandomStrollGoal(this, 1.0)); + this.targetSelector.addGoal(1, new HurtByTargetGoal(this, Drowned.class).setAlertOthers(ZombifiedPiglin.class)); + this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, (target, world) -> this.okTarget(target))); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index d82bba5a4c729c69882354d9e3ca65b36a40c1b3..0444b0787d1a8aeef564dc927a85431e56b6ccd2 100644 +index f9df0bc403a19f4ddedf95907928d9f3003804ab..c5bcf86c2fcbcb5048ee73f9aba848867eb3c3c1 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1068,6 +1068,7 @@ public class PurpurWorldConfig { +@@ -1066,6 +1066,7 @@ public class PurpurWorldConfig { public double drownedJockeyChance = 0.05D; public boolean drownedJockeyTryExistingChickens = true; public boolean drownedTakeDamageFromWater = false; @@ -37,7 +28,7 @@ index d82bba5a4c729c69882354d9e3ca65b36a40c1b3..0444b0787d1a8aeef564dc927a85431e private void drownedSettings() { drownedRidable = getBoolean("mobs.drowned.ridable", drownedRidable); drownedRidableInWater = getBoolean("mobs.drowned.ridable-in-water", drownedRidableInWater); -@@ -1084,6 +1085,7 @@ public class PurpurWorldConfig { +@@ -1082,6 +1083,7 @@ public class PurpurWorldConfig { drownedJockeyChance = getDouble("mobs.drowned.jockey.chance", drownedJockeyChance); drownedJockeyTryExistingChickens = getBoolean("mobs.drowned.jockey.try-existing-chickens", drownedJockeyTryExistingChickens); drownedTakeDamageFromWater = getBoolean("mobs.drowned.takes-damage-from-water", drownedTakeDamageFromWater); diff --git a/patches/unapplied-server/0178-Configurable-hunger-starvation-damage.patch b/patches/server/0174-Configurable-hunger-starvation-damage.patch similarity index 74% rename from patches/unapplied-server/0178-Configurable-hunger-starvation-damage.patch rename to patches/server/0174-Configurable-hunger-starvation-damage.patch index e55828c0f4..f2d1e0a3e0 100644 --- a/patches/unapplied-server/0178-Configurable-hunger-starvation-damage.patch +++ b/patches/server/0174-Configurable-hunger-starvation-damage.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Configurable hunger starvation damage diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java -index b702b7270fae8fafc39588fbc39b4e0014809047..842a908051bdf6c5f0ef8ce3ac84a7ce210500b5 100644 +index a1c2dfb9e2a6efe05389b0716c4d1d0f95311eea..8a43bb4d73ac3c6df892c977cecb2c10a82ef8cd 100644 --- a/src/main/java/net/minecraft/world/food/FoodData.java +++ b/src/main/java/net/minecraft/world/food/FoodData.java -@@ -107,7 +107,7 @@ public class FoodData { +@@ -98,7 +98,7 @@ public class FoodData { ++this.tickTimer; if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation if (player.getHealth() > 10.0F || enumdifficulty == Difficulty.HARD || player.getHealth() > 1.0F && enumdifficulty == Difficulty.NORMAL) { -- player.hurt(player.damageSources().starve(), 1.0F); -+ player.hurt(player.damageSources().starve(), player.level().purpurConfig.hungerStarvationDamage); // Purpur +- player.hurtServer(worldserver, player.damageSources().starve(), 1.0F); ++ player.hurtServer(worldserver, player.damageSources().starve(), player.level().purpurConfig.hungerStarvationDamage); // Purpur } this.tickTimer = 0; diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 0444b0787d1a8aeef564dc927a85431e56b6ccd2..39630c8b603970e9b3b34028d0cc75bda18de053 100644 +index c5bcf86c2fcbcb5048ee73f9aba848867eb3c3c1..93e9cbefce01fc905fad95947673bca2cf8d29f2 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -2688,4 +2688,9 @@ public class PurpurWorldConfig { +@@ -2684,4 +2684,9 @@ public class PurpurWorldConfig { zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry); zombifiedPiglinTakeDamageFromWater = getBoolean("mobs.zombified_piglin.takes-damage-from-water", zombifiedPiglinTakeDamageFromWater); } diff --git a/patches/unapplied-server/0179-Enhance-SysoutCatcher.patch b/patches/server/0175-Enhance-SysoutCatcher.patch similarity index 100% rename from patches/unapplied-server/0179-Enhance-SysoutCatcher.patch rename to patches/server/0175-Enhance-SysoutCatcher.patch diff --git a/patches/unapplied-server/0180-Add-uptime-command.patch b/patches/server/0176-Add-uptime-command.patch similarity index 95% rename from patches/unapplied-server/0180-Add-uptime-command.patch rename to patches/server/0176-Add-uptime-command.patch index 891778176a..01236a4508 100644 --- a/patches/unapplied-server/0180-Add-uptime-command.patch +++ b/patches/server/0176-Add-uptime-command.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add uptime command diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 286f141255984dddbc3252304d6c11b0647cbbf4..af5246b966f2322febb804a85e167ff580d2ab25 100644 +index 5d94b71bd54f99040b76cca74964a32d55339767..0090243f7e1a966534e489cebb88d71d9cbab7bb 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -253,6 +253,7 @@ public class Commands { +@@ -258,6 +258,7 @@ public class Commands { org.purpurmc.purpur.command.CreditsCommand.register(this.dispatcher); // Purpur org.purpurmc.purpur.command.DemoCommand.register(this.dispatcher); // Purpur org.purpurmc.purpur.command.PingCommand.register(this.dispatcher); // Purpur @@ -17,10 +17,10 @@ index 286f141255984dddbc3252304d6c11b0647cbbf4..af5246b966f2322febb804a85e167ff5 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b14bfa10927c1e0e93f1c3515947077f11eb3ece..7e7f66ab202e5ac3bd8f91ed0ab1db51c2679101 100644 +index 6bc6d24022c4f5ea3b7da7074725737fae341fcf..76f31bf31f77c8347b9436779c3701f8a87045e6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -304,6 +304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { // Paper if (!level.isClientSide()) { -@@ -76,7 +79,7 @@ public class ShovelItem extends DiggerItem { - } - } - -- return InteractionResult.sidedSuccess(level.isClientSide); -+ return InteractionResult.SUCCESS; // Purpur - force arm swing - } else { - return InteractionResult.PASS; - } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 39630c8b603970e9b3b34028d0cc75bda18de053..95b5106772a6701ecb0e60206871c139f215e487 100644 +index 93e9cbefce01fc905fad95947673bca2cf8d29f2..8e19b5e1611a78c8dbd614797d8949c329f507e6 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -463,6 +463,280 @@ public class PurpurWorldConfig { +@@ -461,6 +461,280 @@ public class PurpurWorldConfig { snowballDamage = getInt("gameplay-mechanics.projectile-damage.snowball", snowballDamage); } diff --git a/patches/unapplied-server/0182-Store-placer-on-Block-when-placed.patch b/patches/server/0178-Store-placer-on-Block-when-placed.patch similarity index 64% rename from patches/unapplied-server/0182-Store-placer-on-Block-when-placed.patch rename to patches/server/0178-Store-placer-on-Block-when-placed.patch index 15475c0fb1..ca04d0942e 100644 --- a/patches/unapplied-server/0182-Store-placer-on-Block-when-placed.patch +++ b/patches/server/0178-Store-placer-on-Block-when-placed.patch @@ -5,30 +5,30 @@ Subject: [PATCH] Store placer on Block when placed diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8c14f8c9f61baf1842e42b62bcd73717e82a29e1..24a7e1780ec55ea95195b5478eef66015cb21f72 100644 +index d644d02b039ca918391a32a04549f7a34386b3f9..42b259c3878bd34b8e7cb768887fd1456be8db35 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -497,6 +497,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -503,6 +503,7 @@ public final class ItemStack implements DataComponentHolder { world.isBlockPlaceCancelled = true; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent - for (BlockState blockstate : blocks) { - blockstate.update(true, false); + for (BlockState blockstate : blocks) { + blockstate.update(true, false); + ((CraftBlock) blockstate.getBlock()).getNMS().getBlock().forgetPlacer(); // Purpur - } - world.isBlockPlaceCancelled = false; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent - world.preventPoiUpdated = false; -@@ -529,6 +530,7 @@ public final class ItemStack implements DataComponentHolder { - if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically - block.onPlace(world, newblockposition, oldBlock, true, context); } + world.isBlockPlaceCancelled = false; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent + world.preventPoiUpdated = false; +@@ -535,6 +536,7 @@ public final class ItemStack implements DataComponentHolder { + if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically + block.onPlace(world, newblockposition, oldBlock, true, context); + } + block.getBlock().forgetPlacer(); // Purpur - world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point - } + world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point + } diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 29947de9eb6887f2e61516523ff08d8b581b0f53..5dd4ccde6c4c421f697f629adb1adfadce7b8a42 100644 +index fa19720fbb911842db42a4eb0ccf8406cb27c137..135e59e549cbcb3806574f964947b6ff3ea517d1 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -437,7 +437,17 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -440,7 +440,17 @@ public class Block extends BlockBehaviour implements ItemLike { } // Paper - fix drops not preventing stats/food exhaustion } diff --git a/patches/unapplied-server/0183-Summoner-API.patch b/patches/server/0179-Summoner-API.patch similarity index 89% rename from patches/unapplied-server/0183-Summoner-API.patch rename to patches/server/0179-Summoner-API.patch index 3bb3b87094..b7ac71f2eb 100644 --- a/patches/unapplied-server/0183-Summoner-API.patch +++ b/patches/server/0179-Summoner-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Summoner API diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -index 446a2795aa8f2ddf472f8b379534978fca285f3d..a61d23568408f6441b6d728061f5d99861d2b76e 100644 +index db8420f6d1356d400699bd09e67e580546295af7..c6e638cf4463db972a99054cb11b07991ca9eb2e 100644 --- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java +++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java @@ -57,6 +57,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { @@ -49,10 +49,10 @@ index 446a2795aa8f2ddf472f8b379534978fca285f3d..a61d23568408f6441b6d728061f5d998 } diff --git a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java -index 8966aa5e69cab5be770e2767e3e0f479426d8522..2a8d895b2ea78ec68e70bbf2e75ae6559b215868 100644 +index 0d6eca127532cf0bc2a4495df1fcd50e3d97f85e..798aafe6153a711b979f05745d1cd65e6f43192b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java +++ b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java -@@ -47,6 +47,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -50,6 +50,7 @@ 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; @@ -60,7 +60,7 @@ index 8966aa5e69cab5be770e2767e3e0f479426d8522..2a8d895b2ea78ec68e70bbf2e75ae655 public SnowGolem(EntityType type, Level world) { super(type, world); -@@ -75,6 +76,15 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -78,6 +79,15 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.snowGolemScale); } @@ -76,7 +76,7 @@ index 8966aa5e69cab5be770e2767e3e0f479426d8522..2a8d895b2ea78ec68e70bbf2e75ae655 @Override protected void registerGoals() { this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur -@@ -102,6 +112,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -105,6 +115,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM public void addAdditionalSaveData(CompoundTag nbt) { super.addAdditionalSaveData(nbt); nbt.putBoolean("Pumpkin", this.hasPumpkin()); @@ -84,7 +84,7 @@ index 8966aa5e69cab5be770e2767e3e0f479426d8522..2a8d895b2ea78ec68e70bbf2e75ae655 } @Override -@@ -110,6 +121,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -113,6 +124,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM if (nbt.contains("Pumpkin")) { this.setPumpkin(nbt.getBoolean("Pumpkin")); } @@ -93,10 +93,10 @@ index 8966aa5e69cab5be770e2767e3e0f479426d8522..2a8d895b2ea78ec68e70bbf2e75ae655 } diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index 8809b88dec7beffa569de6832f5b458116b143cc..c0d5fc670ff428a4293e8965068f52449a5c8b47 100644 +index 8ecb72f6cd12d1e12f5ae9b240ccd6d9e4f6c248..4e59cbd95d2ee1b69a38fc23015a6262d1a2c53b 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -88,6 +88,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -86,6 +86,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { return !entityliving.getType().is(EntityTypeTags.WITHER_FRIENDS) && entityliving.attackable(); }; private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0D).selector(WitherBoss.LIVING_ENTITY_SELECTOR); @@ -104,7 +104,7 @@ index 8809b88dec7beffa569de6832f5b458116b143cc..c0d5fc670ff428a4293e8965068f5244 private int shootCooldown = 0; // Purpur // Paper start private boolean canPortal = false; -@@ -127,6 +128,15 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -125,6 +126,15 @@ public class WitherBoss extends Monster implements RangedAttackMob { return this.level().purpurConfig.witherTakeDamageFromWater; } @@ -120,7 +120,7 @@ index 8809b88dec7beffa569de6832f5b458116b143cc..c0d5fc670ff428a4293e8965068f5244 @Override protected PathNavigation createNavigation(Level world) { FlyingPathNavigation navigationflying = new FlyingPathNavigation(this, world); -@@ -262,6 +272,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -260,6 +270,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { public void addAdditionalSaveData(CompoundTag nbt) { super.addAdditionalSaveData(nbt); nbt.putInt("Invul", this.getInvulnerableTicks()); @@ -128,7 +128,7 @@ index 8809b88dec7beffa569de6832f5b458116b143cc..c0d5fc670ff428a4293e8965068f5244 } @Override -@@ -271,6 +282,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -269,6 +280,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { if (this.hasCustomName()) { this.bossEvent.setName(this.getDisplayName()); } @@ -137,11 +137,11 @@ index 8809b88dec7beffa569de6832f5b458116b143cc..c0d5fc670ff428a4293e8965068f5244 } diff --git a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java -index 655f51902e5d24643d41c4ec981743543c0890a5..e6a299eeda5d18274fa3b1fb542b217a074c1d83 100644 +index 22242d11e009acab4c9738a1c6ada8b9ba678a0c..828fa78a89f13ef81c53b4d6ea6ef86c7b53024e 100644 --- a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java -@@ -71,7 +71,7 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { - SnowGolem entitysnowman = (SnowGolem) EntityType.SNOW_GOLEM.create(world); +@@ -72,7 +72,7 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { + SnowGolem entitysnowman = (SnowGolem) EntityType.SNOW_GOLEM.create(world, EntitySpawnReason.TRIGGERED); if (entitysnowman != null) { - CarvedPumpkinBlock.spawnGolemInWorld(world, shapedetector_shapedetectorcollection, entitysnowman, shapedetector_shapedetectorcollection.getBlock(0, 2, 0).getPos()); @@ -149,7 +149,7 @@ index 655f51902e5d24643d41c4ec981743543c0890a5..e6a299eeda5d18274fa3b1fb542b217a } } else { BlockPattern.BlockPatternMatch shapedetector_shapedetectorcollection1 = this.getOrCreateIronGolemFull().find(world, pos); -@@ -81,7 +81,7 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { +@@ -82,7 +82,7 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { if (entityirongolem != null) { entityirongolem.setPlayerCreated(true); @@ -158,7 +158,7 @@ index 655f51902e5d24643d41c4ec981743543c0890a5..e6a299eeda5d18274fa3b1fb542b217a } } } -@@ -89,6 +89,16 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { +@@ -90,6 +90,16 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { } private static void spawnGolemInWorld(Level world, BlockPattern.BlockPatternMatch patternResult, Entity entity, BlockPos pos) { @@ -176,10 +176,10 @@ index 655f51902e5d24643d41c4ec981743543c0890a5..e6a299eeda5d18274fa3b1fb542b217a entity.moveTo((double) pos.getX() + 0.5D, (double) pos.getY() + 0.05D, (double) pos.getZ() + 0.5D, 0.0F, 0.0F); // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/level/block/WitherSkullBlock.java b/src/main/java/net/minecraft/world/level/block/WitherSkullBlock.java -index bbf59b2577812e74ffd45f694b83a42e043273c0..5cb06959aeaceeb98cfee34b1df804e6642f305f 100644 +index 0fbe66cc02bd3d95c0a5dcd55380a1b4a2f17ca6..3a7126883f11ac5a647947eaf060df15536a6cb2 100644 --- a/src/main/java/net/minecraft/world/level/block/WitherSkullBlock.java +++ b/src/main/java/net/minecraft/world/level/block/WitherSkullBlock.java -@@ -79,6 +79,7 @@ public class WitherSkullBlock extends SkullBlock { +@@ -80,6 +80,7 @@ public class WitherSkullBlock extends SkullBlock { entitywither.moveTo((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.55D, (double) blockposition1.getZ() + 0.5D, shapedetector_shapedetectorcollection.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F, 0.0F); entitywither.yBodyRot = shapedetector_shapedetectorcollection.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F; entitywither.makeInvulnerable(); diff --git a/patches/unapplied-server/0184-Customizable-sleeping-actionbar-messages.patch b/patches/server/0180-Customizable-sleeping-actionbar-messages.patch similarity index 92% rename from patches/unapplied-server/0184-Customizable-sleeping-actionbar-messages.patch rename to patches/server/0180-Customizable-sleeping-actionbar-messages.patch index 47c381486b..2388f5a96c 100644 --- a/patches/unapplied-server/0184-Customizable-sleeping-actionbar-messages.patch +++ b/patches/server/0180-Customizable-sleeping-actionbar-messages.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Customizable sleeping actionbar messages diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 277a0b6f38b1ce00fd06066b43ac634f80ab441a..c31fd59a311e3e131c8a5fee9f66619f1761ab06 100644 +index 8680572c838dbad0ea13afe041e43f58b2deebc2..c70a1ca4ed978df1b54363e966a8344a2fe6f277 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1070,11 +1070,27 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -1118,11 +1118,27 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (this.canSleepThroughNights()) { if (!this.getServer().isSingleplayer() || this.getServer().isPublished()) { int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); @@ -38,10 +38,10 @@ index 277a0b6f38b1ce00fd06066b43ac634f80ab441a..c31fd59a311e3e131c8a5fee9f66619f } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e081734828f7991ffc33233843779fd65f9ea9d7..d1d1ceabdf6b0bd254fefd64e2504f0865e0c9b2 100644 +index 5d611f5d8ccd635b376bded93bd0278323a585ba..cf922e34824be0d5de3e15c969b7c32f1ed8264a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1570,7 +1570,19 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple +@@ -1832,7 +1832,19 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple }); if (!this.serverLevel().canSleepThroughNights()) { @@ -63,7 +63,7 @@ index e081734828f7991ffc33233843779fd65f9ea9d7..d1d1ceabdf6b0bd254fefd64e2504f08 ((ServerLevel) this.level()).updateSleepingPlayerList(); diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index a914c844c0d4f1e80c40c2798f5e24364778fde9..dabc82f2309f12e684350c430096121927f47b3c 100644 +index a605b6221f3331093b8eb133e9cb4ac5cd54aaae..0051145e950544ad9bb5aceb2043e98060aa11f2 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -188,6 +188,9 @@ public class PurpurConfig { diff --git a/patches/unapplied-server/0185-option-to-disable-shulker-box-items-from-dropping-co.patch b/patches/server/0181-option-to-disable-shulker-box-items-from-dropping-co.patch similarity index 86% rename from patches/unapplied-server/0185-option-to-disable-shulker-box-items-from-dropping-co.patch rename to patches/server/0181-option-to-disable-shulker-box-items-from-dropping-co.patch index a2a5f6db6e..cce03c5b2e 100644 --- a/patches/unapplied-server/0185-option-to-disable-shulker-box-items-from-dropping-co.patch +++ b/patches/server/0181-option-to-disable-shulker-box-items-from-dropping-co.patch @@ -6,10 +6,10 @@ Subject: [PATCH] option to disable shulker box items from dropping contents diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index 3253361d91e2a2e68d354eaf3dd3e3cd486e191d..a255b76cc1e6cb926585110e5f09ded37da7be20 100644 +index b5b7f1db21a22f16f06ced775c8173f90e36a91c..33d9b5fb6897fefb0f7b9009df7339341cb42317 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java -@@ -260,6 +260,7 @@ public class BlockItem extends Item { +@@ -249,6 +249,7 @@ public class BlockItem extends Item { ItemContainerContents itemcontainercontents = (ItemContainerContents) entity.getItem().set(DataComponents.CONTAINER, ItemContainerContents.EMPTY); if (itemcontainercontents != null) { @@ -18,10 +18,10 @@ index 3253361d91e2a2e68d354eaf3dd3e3cd486e191d..a255b76cc1e6cb926585110e5f09ded3 } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 95b5106772a6701ecb0e60206871c139f215e487..6381828cc6cee1ec6c0a7951a36d22937dddf149 100644 +index 8e19b5e1611a78c8dbd614797d8949c329f507e6..d703c467a3d9d1bee5e91b3a1c022cf6fc83497a 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -214,6 +214,7 @@ public class PurpurWorldConfig { +@@ -212,6 +212,7 @@ public class PurpurWorldConfig { public int enderPearlCooldownCreative = 20; public float enderPearlEndermiteChance = 0.05F; public int glowBerriesEatGlowDuration = 0; @@ -29,7 +29,7 @@ index 95b5106772a6701ecb0e60206871c139f215e487..6381828cc6cee1ec6c0a7951a36d2293 private void itemSettings() { itemImmuneToCactus.clear(); getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> { -@@ -260,6 +261,7 @@ public class PurpurWorldConfig { +@@ -258,6 +259,7 @@ public class PurpurWorldConfig { enderPearlCooldownCreative = getInt("gameplay-mechanics.item.ender-pearl.creative-cooldown", enderPearlCooldownCreative); enderPearlEndermiteChance = (float) getDouble("gameplay-mechanics.item.ender-pearl.endermite-spawn-chance", enderPearlEndermiteChance); glowBerriesEatGlowDuration = getInt("gameplay-mechanics.item.glow_berries.eat-glow-duration", glowBerriesEatGlowDuration); diff --git a/patches/unapplied-server/0186-Big-dripleaf-tilt-delay.patch b/patches/server/0182-Big-dripleaf-tilt-delay.patch similarity index 89% rename from patches/unapplied-server/0186-Big-dripleaf-tilt-delay.patch rename to patches/server/0182-Big-dripleaf-tilt-delay.patch index 9d378f9e65..7274621fef 100644 --- a/patches/unapplied-server/0186-Big-dripleaf-tilt-delay.patch +++ b/patches/server/0182-Big-dripleaf-tilt-delay.patch @@ -11,10 +11,10 @@ PARTIAL: big_dripleaf with PARTIAL tilt will change to FULL tilt after 10 ticks UNSTABLE: big_dripleaf with FULL tilt will change back to no tilt after 100 ticks diff --git a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java -index 8240c32d676a88aa23dcd052ee0136767e54fb0d..372c4ab9d390d5afd98947f21c79aae06b15064d 100644 +index 9e3f1441d62128535112621bf259c24f1a90595b..2535e6d71b690f8dfde41a7d9cb76b6f010f5aa7 100644 --- a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java -@@ -244,7 +244,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone +@@ -246,7 +246,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone BigDripleafBlock.playTiltSound(world, blockposition, soundeffect); } @@ -24,10 +24,10 @@ index 8240c32d676a88aa23dcd052ee0136767e54fb0d..372c4ab9d390d5afd98947f21c79aae0 if (i != -1) { world.scheduleTick(blockposition, (Block) this, i); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 6381828cc6cee1ec6c0a7951a36d22937dddf149..b95043a271b4e587b2dc6c56f5c82e601aaa842c 100644 +index d703c467a3d9d1bee5e91b3a1c022cf6fc83497a..c2ba7e7e6d927635979531f6ef08643bcbac5bc0 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -778,6 +778,22 @@ public class PurpurWorldConfig { +@@ -776,6 +776,22 @@ public class PurpurWorldConfig { } } diff --git a/patches/unapplied-server/0187-Player-ridable-in-water-option.patch b/patches/server/0183-Player-ridable-in-water-option.patch similarity index 85% rename from patches/unapplied-server/0187-Player-ridable-in-water-option.patch rename to patches/server/0183-Player-ridable-in-water-option.patch index b9fdd5cf16..70137d04ed 100644 --- a/patches/unapplied-server/0187-Player-ridable-in-water-option.patch +++ b/patches/server/0183-Player-ridable-in-water-option.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player ridable in water option diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 09e1faae9c22c1062e3de5257c82b2d156e65b4f..05ed7bfd75a1e30d74b12a068303a786222a2649 100644 +index 098256932c2e637726e77bbfcd329f1a329c9969..90998ee1671dc115428102e67a3b07c377133e6e 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -2087,6 +2087,13 @@ public abstract class Player extends LivingEntity { +@@ -2033,6 +2033,13 @@ public abstract class Player extends LivingEntity { return slot != EquipmentSlot.BODY; } @@ -23,10 +23,10 @@ index 09e1faae9c22c1062e3de5257c82b2d156e65b4f..05ed7bfd75a1e30d74b12a068303a786 if (!this.isPassenger() && this.onGround() && !this.isInWater() && !this.isInPowderSnow) { if (this.getShoulderEntityLeft().isEmpty()) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index b95043a271b4e587b2dc6c56f5c82e601aaa842c..dae3ead8fc563e3ff714a8d6170549226f44561b 100644 +index c2ba7e7e6d927635979531f6ef08643bcbac5bc0..ccc692652bc26a696abd5debfa825ed9759691a7 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -387,6 +387,7 @@ public class PurpurWorldConfig { +@@ -385,6 +385,7 @@ public class PurpurWorldConfig { public double playerCriticalDamageMultiplier = 1.5D; public int playerBurpDelay = 10; public boolean playerBurpWhenFull = false; @@ -34,7 +34,7 @@ index b95043a271b4e587b2dc6c56f5c82e601aaa842c..dae3ead8fc563e3ff714a8d617054922 private void playerSettings() { if (PurpurConfig.version < 19) { boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer); -@@ -409,6 +410,7 @@ public class PurpurWorldConfig { +@@ -407,6 +408,7 @@ public class PurpurWorldConfig { playerCriticalDamageMultiplier = getDouble("gameplay-mechanics.player.critical-damage-multiplier", playerCriticalDamageMultiplier); playerBurpDelay = getInt("gameplay-mechanics.player.burp-delay", playerBurpDelay); playerBurpWhenFull = getBoolean("gameplay-mechanics.player.burp-when-full", playerBurpWhenFull); diff --git a/patches/unapplied-server/0188-Config-to-disable-Enderman-teleport-on-projectile-hi.patch b/patches/server/0184-Config-to-disable-Enderman-teleport-on-projectile-hi.patch similarity index 75% rename from patches/unapplied-server/0188-Config-to-disable-Enderman-teleport-on-projectile-hi.patch rename to patches/server/0184-Config-to-disable-Enderman-teleport-on-projectile-hi.patch index 835f121396..99d692a089 100644 --- a/patches/unapplied-server/0188-Config-to-disable-Enderman-teleport-on-projectile-hi.patch +++ b/patches/server/0184-Config-to-disable-Enderman-teleport-on-projectile-hi.patch @@ -5,32 +5,32 @@ Subject: [PATCH] Config to disable Enderman teleport on projectile hit diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index 65c7bf88071dda62034d71b6a83caedd49d0902a..ecd117f7e3b2136fcf49384819626fe7de952098 100644 +index 27a4b47ad46700b595dd829e6aab558d170c0a8f..1ef3a5c4a99213a87021232d4bc3f8cb3dd101bb 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -@@ -443,6 +443,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -424,6 +424,7 @@ public class EnderMan extends Monster implements NeutralMob { } else { - flag1 = flag && this.hurtWithCleanWater(source, (ThrownPotion) source.getDirectEntity(), amount); + flag1 = flag && this.hurtWithCleanWater(world, source, (ThrownPotion) source.getDirectEntity(), amount); + if (!flag1 && this.level().purpurConfig.endermanIgnoreProjectiles) return super.hurt(source, amount); // Purpur if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent for (int i = 0; i < 64; ++i) { if (this.teleport()) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index dae3ead8fc563e3ff714a8d6170549226f44561b..2af9b746d436eb8e0ad25f2e4bdca45908a28988 100644 +index ccc692652bc26a696abd5debfa825ed9759691a7..e2152fa2977d1761a399fd3b2d1362b2a805b962 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1443,6 +1443,7 @@ public class PurpurWorldConfig { +@@ -1440,6 +1440,7 @@ public class PurpurWorldConfig { + public boolean endermanAggroEndermites = true; public boolean endermanAggroEndermitesOnlyIfPlayerSpawned = false; - public boolean endermanIgnorePlayerDragonHead = false; public boolean endermanDisableStareAggro = false; + public boolean endermanIgnoreProjectiles = false; private void endermanSettings() { endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable); endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater); -@@ -1466,6 +1467,7 @@ public class PurpurWorldConfig { +@@ -1462,6 +1463,7 @@ public class PurpurWorldConfig { + endermanAggroEndermites = getBoolean("mobs.enderman.aggressive-towards-endermites", endermanAggroEndermites); endermanAggroEndermitesOnlyIfPlayerSpawned = getBoolean("mobs.enderman.aggressive-towards-endermites-only-spawned-by-player-thrown-ender-pearls", endermanAggroEndermitesOnlyIfPlayerSpawned); - endermanIgnorePlayerDragonHead = getBoolean("mobs.enderman.ignore-players-wearing-dragon-head", endermanIgnorePlayerDragonHead); endermanDisableStareAggro = getBoolean("mobs.enderman.disable-player-stare-aggression", endermanDisableStareAggro); + endermanIgnoreProjectiles = getBoolean("mobs.enderman.ignore-projectiles", endermanIgnoreProjectiles); } diff --git a/patches/unapplied-server/0189-Add-compass-command.patch b/patches/server/0185-Add-compass-command.patch similarity index 93% rename from patches/unapplied-server/0189-Add-compass-command.patch rename to patches/server/0185-Add-compass-command.patch index b8d486c030..e9387ffd8f 100644 --- a/patches/unapplied-server/0189-Add-compass-command.patch +++ b/patches/server/0185-Add-compass-command.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add compass command diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index af5246b966f2322febb804a85e167ff580d2ab25..929835b74d539bb0af1bb99f23b50b79f457594e 100644 +index 0090243f7e1a966534e489cebb88d71d9cbab7bb..d8ee4422a13c7f09b84e9bbe8b57f0c139caac32 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -255,6 +255,7 @@ public class Commands { +@@ -260,6 +260,7 @@ public class Commands { org.purpurmc.purpur.command.PingCommand.register(this.dispatcher); // Purpur org.purpurmc.purpur.command.UptimeCommand.register(this.dispatcher); // Purpur org.purpurmc.purpur.command.TPSBarCommand.register(this.dispatcher); // Purpur @@ -17,10 +17,10 @@ index af5246b966f2322febb804a85e167ff580d2ab25..929835b74d539bb0af1bb99f23b50b79 if (environment.includeIntegrated) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d1d1ceabdf6b0bd254fefd64e2504f0865e0c9b2..996bfac666762096fe322e54c2134bab0c08c950 100644 +index cf922e34824be0d5de3e15c969b7c32f1ed8264a..101f2db7d6e7eec85b21c576768224d6c3bba7e7 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -304,6 +304,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple +@@ -325,6 +325,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event public boolean purpurClient = false; // Purpur private boolean tpsBar = false; // Purpur @@ -28,7 +28,7 @@ index d1d1ceabdf6b0bd254fefd64e2504f0865e0c9b2..996bfac666762096fe322e54c2134bab // Paper start - rewrite chunk system private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader; -@@ -602,6 +603,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple +@@ -688,6 +689,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple } if (nbt.contains("Purpur.TPSBar")) { this.tpsBar = nbt.getBoolean("Purpur.TPSBar"); } // Purpur @@ -36,15 +36,15 @@ index d1d1ceabdf6b0bd254fefd64e2504f0865e0c9b2..996bfac666762096fe322e54c2134bab } @Override -@@ -679,6 +681,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple - } +@@ -741,6 +743,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple + this.saveEnderPearls(nbt); nbt.putBoolean("Purpur.TPSBar", this.tpsBar); // Purpur + nbt.putBoolean("Purpur.CompassBar", this.compassBar); // Purpur } - // CraftBukkit start - World fallback code, either respawn location or global spawn -@@ -3092,5 +3095,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple + private void saveParentVehicle(CompoundTag nbt) { +@@ -3447,5 +3450,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple public void tpsBar(boolean tpsBar) { this.tpsBar = tpsBar; } @@ -59,7 +59,7 @@ index d1d1ceabdf6b0bd254fefd64e2504f0865e0c9b2..996bfac666762096fe322e54c2134bab // Purpur end } diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index dabc82f2309f12e684350c430096121927f47b3c..37b802a1de4ade72d53463819d7774436d68be51 100644 +index 0051145e950544ad9bb5aceb2043e98060aa11f2..275078b6b4940fbc771fb1aad0990135d37b51f3 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -257,6 +257,11 @@ public class PurpurConfig { @@ -89,10 +89,10 @@ index dabc82f2309f12e684350c430096121927f47b3c..37b802a1de4ade72d53463819d777443 hideHiddenPlayersFromEntitySelector = getBoolean("settings.command.hide-hidden-players-from-entity-selector", hideHiddenPlayersFromEntitySelector); uptimeFormat = getString("settings.command.uptime.format", uptimeFormat); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 2af9b746d436eb8e0ad25f2e4bdca45908a28988..33276fd97eddeb0d2b47817d3f350ce2f615163b 100644 +index e2152fa2977d1761a399fd3b2d1362b2a805b962..75d5e129e9fb74181aed9d5bd57f19aea67dcfd2 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -215,6 +215,7 @@ public class PurpurWorldConfig { +@@ -213,6 +213,7 @@ public class PurpurWorldConfig { public float enderPearlEndermiteChance = 0.05F; public int glowBerriesEatGlowDuration = 0; public boolean shulkerBoxItemDropContentsWhenDestroyed = true; @@ -100,7 +100,7 @@ index 2af9b746d436eb8e0ad25f2e4bdca45908a28988..33276fd97eddeb0d2b47817d3f350ce2 private void itemSettings() { itemImmuneToCactus.clear(); getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> { -@@ -262,6 +263,7 @@ public class PurpurWorldConfig { +@@ -260,6 +261,7 @@ public class PurpurWorldConfig { enderPearlEndermiteChance = (float) getDouble("gameplay-mechanics.item.ender-pearl.endermite-spawn-chance", enderPearlEndermiteChance); glowBerriesEatGlowDuration = getInt("gameplay-mechanics.item.glow_berries.eat-glow-duration", glowBerriesEatGlowDuration); shulkerBoxItemDropContentsWhenDestroyed = getBoolean("gameplay-mechanics.item.shulker_box.drop-contents-when-destroyed", shulkerBoxItemDropContentsWhenDestroyed); diff --git a/patches/unapplied-server/0190-Toggle-for-kinetic-damage.patch b/patches/server/0186-Toggle-for-kinetic-damage.patch similarity index 72% rename from patches/unapplied-server/0190-Toggle-for-kinetic-damage.patch rename to patches/server/0186-Toggle-for-kinetic-damage.patch index fbfc8d55dd..6d633b6e94 100644 --- a/patches/unapplied-server/0190-Toggle-for-kinetic-damage.patch +++ b/patches/server/0186-Toggle-for-kinetic-damage.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Toggle for kinetic damage diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index c8e5162e3494f221ebbf538d7416c8508358546d..863bfe33d980f1988111669c6a6ae53bee9c4887 100644 +index 5bc3556d437670801f5afda368c5d0e334869f33..fcb024cc70c750887e6d6ce19692385ab5ac9d01 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3064,6 +3064,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3180,6 +3180,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - if (f3 > 0.0F) { - this.playSound(this.getFallDamageSound((int) f3), 1.0F, 1.0F); -+ if (level().purpurConfig.elytraKineticDamage) // Purpur - this.hurt(this.damageSources().flyIntoWall(), f3); - } - } + if (f > 0.0F) { + this.playSound(this.getFallDamageSound((int) f), 1.0F, 1.0F); ++ if (level().purpurConfig.elytraKineticDamage) // Purpur + this.hurt(this.damageSources().flyIntoWall(), f); + } + } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 33276fd97eddeb0d2b47817d3f350ce2f615163b..0dc2f0cb6d9300fd33fcb5813421cbfdebea3446 100644 +index 75d5e129e9fb74181aed9d5bd57f19aea67dcfd2..35796c711fa4aaf2cd456b3f90cfafba1a27f886 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -182,11 +182,13 @@ public class PurpurWorldConfig { +@@ -180,11 +180,13 @@ public class PurpurWorldConfig { public double elytraDamageMultiplyBySpeed = 0; public int elytraDamagePerFireworkBoost = 0; public int elytraDamagePerTridentBoost = 0; diff --git a/patches/unapplied-server/0191-Add-Option-for-disable-observer-clocks.patch b/patches/server/0187-Add-Option-for-disable-observer-clocks.patch similarity index 65% rename from patches/unapplied-server/0191-Add-Option-for-disable-observer-clocks.patch rename to patches/server/0187-Add-Option-for-disable-observer-clocks.patch index 0d52dc80b3..a12806015f 100644 --- a/patches/unapplied-server/0191-Add-Option-for-disable-observer-clocks.patch +++ b/patches/server/0187-Add-Option-for-disable-observer-clocks.patch @@ -6,22 +6,22 @@ Subject: [PATCH] Add Option for disable observer clocks Allow to disable observer clocks: https://www.spigotmc.org/attachments/observerclock-gif.365936/ diff --git a/src/main/java/net/minecraft/world/level/block/ObserverBlock.java b/src/main/java/net/minecraft/world/level/block/ObserverBlock.java -index b38fbe5121f293f425d7673a6ce49b11d0ced0d9..2a74f42672b92393b52a61c27c5b8af77c8c6070 100644 +index 93ed9406c34804831b86d006dbd6087db9948f08..26cb9990b91991e0a2eadc2dcbbf229e2e88fb2d 100644 --- a/src/main/java/net/minecraft/world/level/block/ObserverBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ObserverBlock.java -@@ -71,6 +71,7 @@ public class ObserverBlock extends DirectionalBlock { +@@ -75,6 +75,7 @@ public class ObserverBlock extends DirectionalBlock { @Override - protected BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) { + protected BlockState updateShape(BlockState state, LevelReader world, ScheduledTickAccess tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, RandomSource random) { if (state.getValue(ObserverBlock.FACING) == direction && !(Boolean) state.getValue(ObserverBlock.POWERED)) { -+ if (!world.getMinecraftWorld().purpurConfig.disableObserverClocks || !(neighborState.getBlock() instanceof ObserverBlock) || neighborState.getValue(ObserverBlock.FACING).getOpposite() != direction) // Purpur - this.startSignal(world, pos); ++ if (!world.getWorldBorder().world.purpurConfig.disableObserverClocks || !(neighborState.getBlock() instanceof ObserverBlock) || neighborState.getValue(ObserverBlock.FACING).getOpposite() != direction) // Purpur + this.startSignal(world, tickView, pos); } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 0dc2f0cb6d9300fd33fcb5813421cbfdebea3446..e1618abc6e277c581de90770b0ef4e5286025dc6 100644 +index 35796c711fa4aaf2cd456b3f90cfafba1a27f886..5a9a4a78be81abbd49e9c464864825265f5cb58b 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -362,6 +362,11 @@ public class PurpurWorldConfig { +@@ -360,6 +360,11 @@ public class PurpurWorldConfig { villageSiegeSpawning = getBoolean("gameplay-mechanics.mob-spawning.village-sieges", predicate); } diff --git a/patches/unapplied-server/0192-Customizeable-Zombie-Villager-curing-times.patch b/patches/server/0188-Customizeable-Zombie-Villager-curing-times.patch similarity index 85% rename from patches/unapplied-server/0192-Customizeable-Zombie-Villager-curing-times.patch rename to patches/server/0188-Customizeable-Zombie-Villager-curing-times.patch index cbf93c17dd..a068023d0d 100644 --- a/patches/unapplied-server/0192-Customizeable-Zombie-Villager-curing-times.patch +++ b/patches/server/0188-Customizeable-Zombie-Villager-curing-times.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Customizeable Zombie Villager curing times diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -index 3c4cff3f095cdf2dd74df7bf4bb8f3d5600b342d..9bb75b49ea2d0bd8aafbe537b65f86eb04f6cfe2 100644 +index 7298ba35cb27269e778de6b265933baed3077b36..623e8ef53d6336b3e3c83fd37eda13244a3b4ab6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -225,7 +225,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -227,7 +227,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { if (this.hasEffect(MobEffects.WEAKNESS)) { itemstack.consume(1, player); if (!this.level().isClientSide) { @@ -16,12 +16,12 @@ index 3c4cff3f095cdf2dd74df7bf4bb8f3d5600b342d..9bb75b49ea2d0bd8aafbe537b65f86eb + this.startConverting(player.getUUID(), this.random.nextInt(level().purpurConfig.zombieVillagerCuringTimeMax - level().purpurConfig.zombieVillagerCuringTimeMin + 1) + level().purpurConfig.zombieVillagerCuringTimeMin); // Purpur } - return InteractionResult.SUCCESS; + return InteractionResult.SUCCESS_SERVER; diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index e1618abc6e277c581de90770b0ef4e5286025dc6..eb1d3a1045c580e8da95fdcb0c9fbd3c345ca9eb 100644 +index 5a9a4a78be81abbd49e9c464864825265f5cb58b..15dd9e812f96652314be7f381ef5db5882fdffe0 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -2946,6 +2946,8 @@ public class PurpurWorldConfig { +@@ -2942,6 +2942,8 @@ public class PurpurWorldConfig { public double zombieVillagerJockeyChance = 0.05D; public boolean zombieVillagerJockeyTryExistingChickens = true; public boolean zombieVillagerTakeDamageFromWater = false; @@ -30,7 +30,7 @@ index e1618abc6e277c581de90770b0ef4e5286025dc6..eb1d3a1045c580e8da95fdcb0c9fbd3c private void zombieVillagerSettings() { zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable); zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater); -@@ -2962,6 +2964,8 @@ public class PurpurWorldConfig { +@@ -2958,6 +2960,8 @@ public class PurpurWorldConfig { zombieVillagerJockeyChance = getDouble("mobs.zombie_villager.jockey.chance", zombieVillagerJockeyChance); zombieVillagerJockeyTryExistingChickens = getBoolean("mobs.zombie_villager.jockey.try-existing-chickens", zombieVillagerJockeyTryExistingChickens); zombieVillagerTakeDamageFromWater = getBoolean("mobs.zombie_villager.takes-damage-from-water", zombieVillagerTakeDamageFromWater); diff --git a/patches/unapplied-server/0193-Option-for-sponges-to-work-on-lava-and-mud.patch b/patches/server/0189-Option-for-sponges-to-work-on-lava-and-mud.patch similarity index 87% rename from patches/unapplied-server/0193-Option-for-sponges-to-work-on-lava-and-mud.patch rename to patches/server/0189-Option-for-sponges-to-work-on-lava-and-mud.patch index 5ad6c58fe9..99fe0ca265 100644 --- a/patches/unapplied-server/0193-Option-for-sponges-to-work-on-lava-and-mud.patch +++ b/patches/server/0189-Option-for-sponges-to-work-on-lava-and-mud.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Option for sponges to work on lava and mud Co-authored by: granny diff --git a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java -index a676ccfa6b02e8986df6f6a2e04cbb06b3edd0ff..6fe44572e34ad3e3a1851e73138bd8b778eb7849 100644 +index d82c62cdb219cee0bbc3083e38e18b7615ad09ef..4c5bc71fef307d13b640e534ace0b4411f6e97e2 100644 --- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java -@@ -77,7 +77,7 @@ public class SpongeBlock extends Block { +@@ -80,7 +80,7 @@ public class SpongeBlock extends Block { FluidState fluid = blockList.getFluidState(blockposition1); // CraftBukkit end @@ -18,7 +18,7 @@ index a676ccfa6b02e8986df6f6a2e04cbb06b3edd0ff..6fe44572e34ad3e3a1851e73138bd8b7 return false; } else { Block block = iblockdata.getBlock(); -@@ -92,6 +92,10 @@ public class SpongeBlock extends Block { +@@ -95,6 +95,10 @@ public class SpongeBlock extends Block { if (iblockdata.getBlock() instanceof LiquidBlock) { blockList.setBlock(blockposition1, Blocks.AIR.defaultBlockState(), 3); // CraftBukkit @@ -30,10 +30,10 @@ index a676ccfa6b02e8986df6f6a2e04cbb06b3edd0ff..6fe44572e34ad3e3a1851e73138bd8b7 if (!iblockdata.is(Blocks.KELP) && !iblockdata.is(Blocks.KELP_PLANT) && !iblockdata.is(Blocks.SEAGRASS) && !iblockdata.is(Blocks.TALL_SEAGRASS)) { return false; diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index eb1d3a1045c580e8da95fdcb0c9fbd3c345ca9eb..ad26914101f87e81b6822860e15d011ad1db5daa 100644 +index 15dd9e812f96652314be7f381ef5db5882fdffe0..c99081ab84abc507523060a667e5978c711b2ee1 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -964,9 +964,13 @@ public class PurpurWorldConfig { +@@ -962,9 +962,13 @@ public class PurpurWorldConfig { public int spongeAbsorptionArea = 65; public int spongeAbsorptionRadius = 6; diff --git a/patches/unapplied-server/0194-Toggle-for-Wither-s-spawn-sound.patch b/patches/server/0190-Toggle-for-Wither-s-spawn-sound.patch similarity index 76% rename from patches/unapplied-server/0194-Toggle-for-Wither-s-spawn-sound.patch rename to patches/server/0190-Toggle-for-Wither-s-spawn-sound.patch index a8310bc010..73470b4847 100644 --- a/patches/unapplied-server/0194-Toggle-for-Wither-s-spawn-sound.patch +++ b/patches/server/0190-Toggle-for-Wither-s-spawn-sound.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Toggle for Wither's spawn sound diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index c0d5fc670ff428a4293e8965068f52449a5c8b47..8d9154fc197e8604a5b07efe6b2aa76d7a122b0e 100644 +index 4e59cbd95d2ee1b69a38fc23015a6262d1a2c53b..1857e0899b32a078bd0e9e4b784ea60b97aa70ef 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -434,7 +434,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -424,7 +424,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { } // CraftBukkit end - if (!this.isSilent()) { + if (!this.isSilent() && level().purpurConfig.witherPlaySpawnSound) { // CraftBukkit start - Use relative location for far away sounds - // this.level().globalLevelEvent(1023, new BlockPosition(this), 0); - int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16; + // worldserver.globalLevelEvent(1023, new BlockPosition(this), 0); + int viewDistance = world.getCraftServer().getViewDistance() * 16; diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index ad26914101f87e81b6822860e15d011ad1db5daa..4accff1edd89a299e6f8fc52be17e7680870220b 100644 +index c99081ab84abc507523060a667e5978c711b2ee1..2d7cce0181138191055da707fcdd1c7504c96675 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -2781,6 +2781,7 @@ public class PurpurWorldConfig { +@@ -2777,6 +2777,7 @@ public class PurpurWorldConfig { public boolean witherTakeDamageFromWater = false; public boolean witherCanRideVehicles = false; public float witherExplosionRadius = 1.0F; @@ -29,7 +29,7 @@ index ad26914101f87e81b6822860e15d011ad1db5daa..4accff1edd89a299e6f8fc52be17e768 private void witherSettings() { witherRidable = getBoolean("mobs.wither.ridable", witherRidable); witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater); -@@ -2803,6 +2804,7 @@ public class PurpurWorldConfig { +@@ -2799,6 +2800,7 @@ public class PurpurWorldConfig { witherTakeDamageFromWater = getBoolean("mobs.wither.takes-damage-from-water", witherTakeDamageFromWater); witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles); witherExplosionRadius = (float) getDouble("mobs.wither.explosion-radius", witherExplosionRadius); diff --git a/patches/unapplied-server/0195-Cactus-breaks-from-solid-neighbors-config.patch b/patches/server/0191-Cactus-breaks-from-solid-neighbors-config.patch similarity index 84% rename from patches/unapplied-server/0195-Cactus-breaks-from-solid-neighbors-config.patch rename to patches/server/0191-Cactus-breaks-from-solid-neighbors-config.patch index fcf1932dae..f7ee028aae 100644 --- a/patches/unapplied-server/0195-Cactus-breaks-from-solid-neighbors-config.patch +++ b/patches/server/0191-Cactus-breaks-from-solid-neighbors-config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cactus breaks from solid neighbors config diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java -index ff4dda48116a2969704b355ff96407ba869b466e..9200d75b05ce535f7b7f5c1572cd8f6261c6955b 100644 +index c045b1cccf0047dbef8c04d5a28d31d53389054f..bbfd8f5d404d0add94f0d8ac89a2964692b37e44 100644 --- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java -@@ -114,7 +114,7 @@ public class CactusBlock extends Block { +@@ -115,7 +115,7 @@ public class CactusBlock extends Block { enumdirection = (Direction) iterator.next(); iblockdata1 = world.getBlockState(pos.relative(enumdirection)); @@ -18,10 +18,10 @@ index ff4dda48116a2969704b355ff96407ba869b466e..9200d75b05ce535f7b7f5c1572cd8f62 return false; } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 4accff1edd89a299e6f8fc52be17e7680870220b..a0c3ebc4475f70320cf686c1bcc5d21efb46d551 100644 +index 2d7cce0181138191055da707fcdd1c7504c96675..20cc04b4d9ce8f08ed620a26e501afd1cb8ffd6f 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -805,6 +805,11 @@ public class PurpurWorldConfig { +@@ -803,6 +803,11 @@ public class PurpurWorldConfig { }); } diff --git a/patches/unapplied-server/0196-Config-to-remove-curse-of-binding-with-weakness.patch b/patches/server/0192-Config-to-remove-curse-of-binding-with-weakness.patch similarity index 92% rename from patches/unapplied-server/0196-Config-to-remove-curse-of-binding-with-weakness.patch rename to patches/server/0192-Config-to-remove-curse-of-binding-with-weakness.patch index aa09a958f6..639b33c40f 100644 --- a/patches/unapplied-server/0196-Config-to-remove-curse-of-binding-with-weakness.patch +++ b/patches/server/0192-Config-to-remove-curse-of-binding-with-weakness.patch @@ -18,10 +18,10 @@ index 6c0b6abb1698fac9bb902f695b725d4ab783ee90..091e3c3514fcb378b68098114106d09f } diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index a0c3ebc4475f70320cf686c1bcc5d21efb46d551..68140248e65a733768c4d6da79fde84a25836e70 100644 +index 20cc04b4d9ce8f08ed620a26e501afd1cb8ffd6f..c85acd8ceaa2b36a7fcf298076016c682c987871 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -397,6 +397,7 @@ public class PurpurWorldConfig { +@@ -395,6 +395,7 @@ public class PurpurWorldConfig { public int playerBurpDelay = 10; public boolean playerBurpWhenFull = false; public boolean playerRidableInWater = false; @@ -29,7 +29,7 @@ index a0c3ebc4475f70320cf686c1bcc5d21efb46d551..68140248e65a733768c4d6da79fde84a private void playerSettings() { if (PurpurConfig.version < 19) { boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer); -@@ -420,6 +421,7 @@ public class PurpurWorldConfig { +@@ -418,6 +419,7 @@ public class PurpurWorldConfig { playerBurpDelay = getInt("gameplay-mechanics.player.burp-delay", playerBurpDelay); playerBurpWhenFull = getBoolean("gameplay-mechanics.player.burp-when-full", playerBurpWhenFull); playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater); diff --git a/patches/unapplied-server/0197-Conduit-behavior-configuration.patch b/patches/server/0193-Conduit-behavior-configuration.patch similarity index 89% rename from patches/unapplied-server/0197-Conduit-behavior-configuration.patch rename to patches/server/0193-Conduit-behavior-configuration.patch index 7e553e94f9..dfb54e5e53 100644 --- a/patches/unapplied-server/0197-Conduit-behavior-configuration.patch +++ b/patches/server/0193-Conduit-behavior-configuration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Conduit behavior configuration diff --git a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java -index 73e532dc998e5701c1a73da846da3d3a79871b81..ff6fea842ca80c2ba51693fe62e5b74f9affdc19 100644 +index d354c2ad41533ec8d52f7c5f63f8f74a0b1ce235..a43c41a26c1e34a2f4eda1c498a562664a783c77 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java -@@ -168,7 +168,7 @@ public class ConduitBlockEntity extends BlockEntity { +@@ -169,7 +169,7 @@ public class ConduitBlockEntity extends BlockEntity { if ((l > 1 || i1 > 1 || j1 > 1) && (i == 0 && (i1 == 2 || j1 == 2) || j == 0 && (l == 2 || j1 == 2) || k == 0 && (l == 2 || i1 == 2))) { BlockPos blockposition2 = pos.offset(i, j, k); BlockState iblockdata = world.getBlockState(blockposition2); @@ -17,7 +17,7 @@ index 73e532dc998e5701c1a73da846da3d3a79871b81..ff6fea842ca80c2ba51693fe62e5b74f int k1 = ablock.length; for (int l1 = 0; l1 < k1; ++l1) { -@@ -188,13 +188,13 @@ public class ConduitBlockEntity extends BlockEntity { +@@ -189,13 +189,13 @@ public class ConduitBlockEntity extends BlockEntity { private static void applyEffects(Level world, BlockPos pos, List activatingBlocks) { // CraftBukkit start @@ -34,7 +34,7 @@ index 73e532dc998e5701c1a73da846da3d3a79871b81..ff6fea842ca80c2ba51693fe62e5b74f // CraftBukkit start return j; } -@@ -237,20 +237,20 @@ public class ConduitBlockEntity extends BlockEntity { +@@ -238,20 +238,20 @@ public class ConduitBlockEntity extends BlockEntity { tileentityconduit.destroyTarget = ConduitBlockEntity.findDestroyTarget(world, blockposition, tileentityconduit.destroyTargetUUID); tileentityconduit.destroyTargetUUID = null; } else if (tileentityconduit.destroyTarget == null) { @@ -53,12 +53,12 @@ index 73e532dc998e5701c1a73da846da3d3a79871b81..ff6fea842ca80c2ba51693fe62e5b74f // CraftBukkit start if (damageTarget && tileentityconduit.destroyTarget != null) { -- if (tileentityconduit.destroyTarget.hurt(world.damageSources().magic().directBlock(world, blockposition), 4.0F)) { -+ if (tileentityconduit.destroyTarget.hurt(world.damageSources().magic().directBlock(world, blockposition), world.purpurConfig.conduitDamageAmount)) { // Purpur +- if (tileentityconduit.destroyTarget.hurtServer((ServerLevel) world, world.damageSources().magic().directBlock(world, blockposition), 4.0F)) { ++ if (tileentityconduit.destroyTarget.hurtServer((ServerLevel) world, world.damageSources().magic().directBlock(world, blockposition), world.purpurConfig.conduitDamageAmount)) { // Purpur world.playSound(null, tileentityconduit.destroyTarget.getX(), tileentityconduit.destroyTarget.getY(), tileentityconduit.destroyTarget.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F); } // CraftBukkit end -@@ -275,16 +275,22 @@ public class ConduitBlockEntity extends BlockEntity { +@@ -276,16 +276,22 @@ public class ConduitBlockEntity extends BlockEntity { } public static AABB getDestroyRangeAABB(BlockPos pos) { @@ -97,10 +97,10 @@ index c1759aeb3e6ad0e4eb66cba3da1b120dd1dce812..1a91bc2e422db0eba65694ac046f1b36 @Override diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 68140248e65a733768c4d6da79fde84a25836e70..9a157c1b29f216b596b52de974fa212033c0ce12 100644 +index c85acd8ceaa2b36a7fcf298076016c682c987871..fc6ebb8ee607b8d54d5b66c119161e59c11b9ea8 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -3015,4 +3015,27 @@ public class PurpurWorldConfig { +@@ -3011,4 +3011,27 @@ public class PurpurWorldConfig { private void hungerSettings() { hungerStarvationDamage = (float) getDouble("hunger.starvation-damage", hungerStarvationDamage); } diff --git a/patches/unapplied-server/0198-Cauldron-fill-chances.patch b/patches/server/0194-Cauldron-fill-chances.patch similarity index 91% rename from patches/unapplied-server/0198-Cauldron-fill-chances.patch rename to patches/server/0194-Cauldron-fill-chances.patch index 2e2a7e8260..4aef2f98ce 100644 --- a/patches/unapplied-server/0198-Cauldron-fill-chances.patch +++ b/patches/server/0194-Cauldron-fill-chances.patch @@ -18,10 +18,10 @@ index c9968934f4ecaa8d81e545f279b3001c7b1ce545..03e4fce6f8226451365fc2831b5bf1e5 @Override diff --git a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -index a2bd54dae4b0460d200f6d5300194a7ef5a28830..bf189a171530abfc9bba5db5a305feb391f2cbee 100644 +index 53cea36ec931de89e0060613acf87beb51dc16ec..fd5489993dca0f940da69e9163f78e5c2e6ee063 100644 --- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -@@ -190,7 +190,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate +@@ -194,7 +194,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate @VisibleForTesting public static void maybeTransferFluid(BlockState state, ServerLevel world, BlockPos pos, float dripChance) { @@ -30,7 +30,7 @@ index a2bd54dae4b0460d200f6d5300194a7ef5a28830..bf189a171530abfc9bba5db5a305feb3 if (PointedDripstoneBlock.isStalactiteStartPos(state, world, pos)) { Optional optional = PointedDripstoneBlock.getFluidAboveStalactite(world, pos, state); -@@ -199,13 +199,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate +@@ -203,13 +203,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate float f1; if (fluidtype == Fluids.WATER) { @@ -47,10 +47,10 @@ index a2bd54dae4b0460d200f6d5300194a7ef5a28830..bf189a171530abfc9bba5db5a305feb3 if (dripChance < f1) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 9a157c1b29f216b596b52de974fa212033c0ce12..69a4fb9e34ee36e8572456cead198432470874ff 100644 +index fc6ebb8ee607b8d54d5b66c119161e59c11b9ea8..4f3a1e897834f1ea7c4de04651489351f6407be3 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -3038,4 +3038,15 @@ public class PurpurWorldConfig { +@@ -3034,4 +3034,15 @@ public class PurpurWorldConfig { }); conduitBlocks = conduitBlockList.toArray(Block[]::new); } diff --git a/patches/unapplied-server/0199-Config-to-allow-mobs-to-pathfind-over-rails.patch b/patches/server/0195-Config-to-allow-mobs-to-pathfind-over-rails.patch similarity index 69% rename from patches/unapplied-server/0199-Config-to-allow-mobs-to-pathfind-over-rails.patch rename to patches/server/0195-Config-to-allow-mobs-to-pathfind-over-rails.patch index bc3bd338a6..00b28c9f32 100644 --- a/patches/unapplied-server/0199-Config-to-allow-mobs-to-pathfind-over-rails.patch +++ b/patches/server/0195-Config-to-allow-mobs-to-pathfind-over-rails.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Config to allow mobs to pathfind over rails diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -index d5004290e40a1ff5e0fcfe75f8da34ae15962359..31ae0f466ae522d767907ec5066b26695f327b96 100644 +index c84fd369d92932903c76bb2012602617d3e2d213..f6291ff377b38cb84692a9fd564b4b1a9780cf4f 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java @@ -240,7 +240,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { @@ -18,21 +18,21 @@ index d5004290e40a1ff5e0fcfe75f8da34ae15962359..31ae0f466ae522d767907ec5066b2669 && pathType != PathType.POWDER_SNOW) { node = this.tryJumpOn(x, y, z, maxYStep, prevFeetY, direction, nodeType, mutableBlockPos); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 69a4fb9e34ee36e8572456cead198432470874ff..a08e091b918c29d2041d717ef3fe284ef9281d64 100644 +index 4f3a1e897834f1ea7c4de04651489351f6407be3..aa49d0b5c1e21172af898648a0fe1ff65da7d7a9 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -139,6 +139,7 @@ public class PurpurWorldConfig { - public double tridentLoyaltyVoidReturnHeight = 0.0D; - public int raidCooldownSeconds = 0; - public int animalBreedingCooldownSeconds = 0; +@@ -138,6 +138,7 @@ public class PurpurWorldConfig { + public boolean imposeTeleportRestrictionsOnEndPortals = false; + public boolean tickFluids = true; + public double mobsBlindnessMultiplier = 1; + public boolean mobsIgnoreRails = false; private void miscGameplayMechanicsSettings() { useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending); alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative); -@@ -160,6 +161,7 @@ public class PurpurWorldConfig { - tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight); - raidCooldownSeconds = getInt("gameplay-mechanics.raid-cooldown-seconds", raidCooldownSeconds); - animalBreedingCooldownSeconds = getInt("gameplay-mechanics.animal-breeding-cooldown-seconds", animalBreedingCooldownSeconds); +@@ -158,6 +159,7 @@ public class PurpurWorldConfig { + imposeTeleportRestrictionsOnEndPortals = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-end-portals", imposeTeleportRestrictionsOnEndPortals); + tickFluids = getBoolean("gameplay-mechanics.tick-fluids", tickFluids); + mobsBlindnessMultiplier = getDouble("gameplay-mechanics.entity-blindness-multiplier", mobsBlindnessMultiplier); + mobsIgnoreRails = getBoolean("gameplay-mechanics.mobs-ignore-rails", mobsIgnoreRails); } diff --git a/patches/unapplied-server/0200-Shulker-change-color-with-dye.patch b/patches/server/0196-Shulker-change-color-with-dye.patch similarity index 88% rename from patches/unapplied-server/0200-Shulker-change-color-with-dye.patch rename to patches/server/0196-Shulker-change-color-with-dye.patch index 526dc95fc6..604adf79d2 100644 --- a/patches/unapplied-server/0200-Shulker-change-color-with-dye.patch +++ b/patches/server/0196-Shulker-change-color-with-dye.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shulker change color with dye diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java -index 6f1deb4d26c851ca99fbadf1eb5b7847eadbf25b..099d6ce14d9c2fa0af1e9bf96c09cd3d44bc4cc8 100644 +index 79bf3d04fa2c7bcadfff08dc9a464e589866f7db..131c7d7e85a3d9ac0e485fd8e56bd419a775289d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java +++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java -@@ -125,6 +125,19 @@ public class Shulker extends AbstractGolem implements VariantHolder -Date: Fri, 14 May 2021 21:22:57 +0100 -Subject: [PATCH] Configurable powered rail boost modifier - - -diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index d7bcfca8c79cc172bb7e4aaeee76ff393d1d2bea..8b1c00062a5272d1020bc85491d8627c4d5f46cb 100644 ---- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -683,7 +683,7 @@ public abstract class AbstractMinecart extends VehicleEntity { - if (d18 > 0.01D) { - double d20 = 0.06D; - -- this.setDeltaMovement(vec3d4.add(vec3d4.x / d18 * 0.06D, 0.0D, vec3d4.z / d18 * 0.06D)); -+ this.setDeltaMovement(vec3d4.add(vec3d4.x / d18 * this.level().purpurConfig.poweredRailBoostModifier, 0.0D, vec3d4.z / d18 * this.level().purpurConfig.poweredRailBoostModifier)); // Purpur - } else { - Vec3 vec3d5 = this.getDeltaMovement(); - double d21 = vec3d5.x; -diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 79130d2f36feb0c402f58aee1f7c0eff07b47b36..7d59c418f583d7247868595a2b00c2328c351e30 100644 ---- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -268,6 +268,7 @@ public class PurpurWorldConfig { - public boolean minecartControllableFallDamage = true; - public double minecartControllableBaseSpeed = 0.1D; - public Map minecartControllableBlockSpeeds = new HashMap<>(); -+ public double poweredRailBoostModifier = 0.06; - private void minecartSettings() { - if (PurpurConfig.version < 12) { - boolean oldBool = getBoolean("gameplay-mechanics.controllable-minecarts.place-anywhere", minecartPlaceAnywhere); -@@ -320,6 +321,7 @@ public class PurpurWorldConfig { - set("gameplay-mechanics.minecart.controllable.block-speed.grass_block", 0.3D); - set("gameplay-mechanics.minecart.controllable.block-speed.stone", 0.5D); - } -+ poweredRailBoostModifier = getDouble("gameplay-mechanics.minecart.powered-rail.boost-modifier", poweredRailBoostModifier); - } - - public boolean catSpawning; diff --git a/patches/unapplied-server/0167-Bee-can-work-when-raining-or-at-night.patch b/patches/unapplied-server/0167-Bee-can-work-when-raining-or-at-night.patch deleted file mode 100644 index cee7d593de..0000000000 --- a/patches/unapplied-server/0167-Bee-can-work-when-raining-or-at-night.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: DoctaEnkoda -Date: Thu, 27 May 2021 06:46:30 +0200 -Subject: [PATCH] Bee can work when raining or at night - - -diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index e7f85150fb7dcee5ba0d7bc3830a0544e18e9817..55fb4555dacfb6c34ff491b88cfed2b6e2ab3a6f 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Bee.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -406,7 +406,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { - - boolean wantsToEnterHive() { - if (this.stayOutOfHiveCountdown <= 0 && !this.beePollinateGoal.isPollinating() && !this.hasStung() && this.getTarget() == null) { -- boolean flag = this.isTiredOfLookingForNectar() || this.level().isRaining() || this.level().isNight() || this.hasNectar(); -+ boolean flag = this.isTiredOfLookingForNectar() || (this.level().isRaining() && !this.level().purpurConfig.beeCanWorkInRain) || (this.level().isNight() && !this.level().purpurConfig.beeCanWorkAtNight) || this.hasNectar(); // Purpur - - return flag && !this.isHiveNearFire(); - } else { -diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -index fb84af3b1709101fa572d11a1c27970a316f2eab..5e982bab268746a05b97f5b9f71422548ea12983 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -@@ -212,7 +212,7 @@ public class BeehiveBlockEntity extends BlockEntity { - } - - private static boolean releaseOccupant(Level world, BlockPos blockposition, BlockState iblockdata, BeehiveBlockEntity.Occupant tileentitybeehive_c, @Nullable List list, BeehiveBlockEntity.BeeReleaseStatus tileentitybeehive_releasestatus, @Nullable BlockPos blockposition1, boolean force) { -- if (!force && (world.isNight() || world.isRaining()) && tileentitybeehive_releasestatus != BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY) { -+ if (!force && ((world.isNight() && !world.purpurConfig.beeCanWorkAtNight) || (world.isRaining() && !world.purpurConfig.beeCanWorkInRain)) && tileentitybeehive_releasestatus != BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY) { // Purpur - // CraftBukkit end - return false; - } else { -diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index e52308a81158014fadbc486604ae54a232d2a4b0..722a3a1f222536995a3da0a4ad1f85db590a61c0 100644 ---- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -748,6 +748,8 @@ public class PurpurWorldConfig { - public double beeScale = 1.0D; - public int beeBreedingTicks = 6000; - public boolean beeTakeDamageFromWater = false; -+ public boolean beeCanWorkAtNight = false; -+ public boolean beeCanWorkInRain = false; - private void beeSettings() { - beeRidable = getBoolean("mobs.bee.ridable", beeRidable); - beeRidableInWater = getBoolean("mobs.bee.ridable-in-water", beeRidableInWater); -@@ -762,6 +764,8 @@ public class PurpurWorldConfig { - beeScale = Mth.clamp(getDouble("mobs.bee.attributes.scale", beeScale), 0.0625D, 16.0D); - beeBreedingTicks = getInt("mobs.bee.breeding-delay-ticks", beeBreedingTicks); - beeTakeDamageFromWater = getBoolean("mobs.bee.takes-damage-from-water", beeTakeDamageFromWater); -+ beeCanWorkAtNight = getBoolean("mobs.bee.can-work-at-night", beeCanWorkAtNight); -+ beeCanWorkInRain = getBoolean("mobs.bee.can-work-in-rain", beeCanWorkInRain); - } - - public boolean blazeRidable = false;