From 850adae00caaf421afb95ea33fad0b9dbaebe269 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 30 Sep 2024 06:23:20 -0400 Subject: [PATCH] Updated Upstream (Paper/Gale) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@f9c7f2a Begin switching to JSpecify annotations (#11448) PaperMC/Paper@e3c8a8e Add PlayerInsertLecternBookEvent [1.20 port] (#7305) PaperMC/Paper@b410fe8 Configurable per-world void damage offset/damage(#11436) PaperMC/Paper@ea00be3 Do not NPE on uuid resolution in player profile (#11449) PaperMC/Paper@ba3c29b Finish converting all events to jspecify annotations Gale Changes: Dreeam-qwq/Gale@51fb9cd Updated Upstream (Paper) Dreeam-qwq/Gale@7f08ee6 Updated Upstream (Paper) --- gradle.properties | 2 +- patches/api/0004-Purpur-API-Changes.patch | 4 +- patches/api/0006-Bump-Dependencies.patch | 13 ++-- .../server/0011-Purpur-Server-Changes.patch | 61 +++++++------------ .../0017-Remove-vanilla-username-check.patch | 4 +- ...able-movement-speed-of-more-entities.patch | 24 ++++---- ...missing-purpur-configuration-options.patch | 18 +++--- ...k-nearby-fire-or-lava-on-entity-move.patch | 6 +- ...er-PR-Throttle-failed-spawn-attempts.patch | 4 +- 9 files changed, 60 insertions(+), 76 deletions(-) diff --git a/gradle.properties b/gradle.properties index 266781c1..a0e8653f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group = cn.dreeam.leaf mcVersion = 1.21.1 version = 1.21.1-R0.1-SNAPSHOT -galeCommit = d4d81da33a046d672329d37721d2d3b5d12cf14f +galeCommit = 7f08ee6661835ace633849f51004a7e932a06a60 org.gradle.caching = true org.gradle.parallel = true diff --git a/patches/api/0004-Purpur-API-Changes.patch b/patches/api/0004-Purpur-API-Changes.patch index 726fe934..e7e33529 100644 --- a/patches/api/0004-Purpur-API-Changes.patch +++ b/patches/api/0004-Purpur-API-Changes.patch @@ -533,10 +533,10 @@ index b1c34f4d44b420930e79dd440328e522b669601f..ab6e3eb18b9c36fdd8f56f491332085a + // Purpur end } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index adcd8161846b06fd1a7895750f98b629204a8406..efe32ca9cbe0cd43e308ab0528f345345584c254 100644 +index ef32a937e6faf1e8a5d6b1207986715bae5a246c..36cf567973900d1e472616748926aecb9afcb42f 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4161,6 +4161,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4209,6 +4209,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public DragonBattle getEnderDragonBattle(); diff --git a/patches/api/0006-Bump-Dependencies.patch b/patches/api/0006-Bump-Dependencies.patch index 095d119a..1a2f35ca 100644 --- a/patches/api/0006-Bump-Dependencies.patch +++ b/patches/api/0006-Bump-Dependencies.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bump Dependencies diff --git a/build.gradle.kts b/build.gradle.kts -index e8963d72ffbfe1fe6cd5e0d55b06897b7ecac560..88e1e3a4e266c1b7bd709316b04f18fd589a64b2 100644 +index 869f13a4a520c41248fe3d9e6709c637e292a53e..322074316689c220eb49cf7857923f1913479d35 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,8 +12,10 @@ java { @@ -46,7 +46,7 @@ index e8963d72ffbfe1fe6cd5e0d55b06897b7ecac560..88e1e3a4e266c1b7bd709316b04f18fd apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion")) apiAndDocs("net.kyori:adventure-api") apiAndDocs("net.kyori:adventure-text-minimessage") -@@ -52,31 +54,40 @@ dependencies { +@@ -52,32 +54,41 @@ dependencies { apiAndDocs("net.kyori:adventure-text-logger-slf4j") api("org.apache.logging.log4j:log4j-api:$log4jVersion") api("org.slf4j:slf4j-api:$slf4jVersion") @@ -76,6 +76,7 @@ index e8963d72ffbfe1fe6cd5e0d55b06897b7ecac560..88e1e3a4e266c1b7bd709316b04f18fd compileOnlyApi(checkerQual) testCompileOnly(checkerQual) // Paper end + api("org.jspecify:jspecify:1.0.0") // Paper - add jspecify - testImplementation("org.apache.commons:commons-lang3:3.12.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") @@ -96,7 +97,7 @@ index e8963d72ffbfe1fe6cd5e0d55b06897b7ecac560..88e1e3a4e266c1b7bd709316b04f18fd } // Paper start -@@ -164,12 +175,12 @@ tasks.withType { +@@ -165,12 +176,12 @@ tasks.withType { options.use() options.isDocFilesSubDirs = true options.links( @@ -109,9 +110,9 @@ index e8963d72ffbfe1fe6cd5e0d55b06897b7ecac560..88e1e3a4e266c1b7bd709316b04f18fd - "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html", + "https://javadoc.io/doc/org.joml/joml/latest/index.html", // Leaf - Bump Dependencies "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1", + "https://jspecify.dev/docs/api/", // Paper end - // Paper start -@@ -181,9 +192,9 @@ tasks.withType { +@@ -183,9 +194,9 @@ tasks.withType { "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/", "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/", @@ -123,7 +124,7 @@ index e8963d72ffbfe1fe6cd5e0d55b06897b7ecac560..88e1e3a4e266c1b7bd709316b04f18fd ) options.tags("apiNote:a:API Note:") -@@ -226,6 +237,11 @@ val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks. +@@ -228,6 +239,11 @@ val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks. jarToScan.set(tasks.jar.flatMap { it.archiveFile }) classpath.from(configurations.compileClasspath) } diff --git a/patches/server/0011-Purpur-Server-Changes.patch b/patches/server/0011-Purpur-Server-Changes.patch index 09936013..f5267151 100644 --- a/patches/server/0011-Purpur-Server-Changes.patch +++ b/patches/server/0011-Purpur-Server-Changes.patch @@ -21,6 +21,7 @@ Add-log-suppression-for-LibraryLoader.patch Fix-outdated-server-showing-in-ping-before-server-fu.patch Fix-cow-rotation-when-shearing-mooshroom.patch Skip-events-if-there-s-no-listeners.patch +Configurable-void-damage-height-and-damage.patch Add-5-second-tps-average-in-tps.patch Arrows-should-not-reset-despawn-counter.patch Halloween-options-and-optimizations.patch @@ -2097,7 +2098,7 @@ index f43bf280999ff3860cc702def50cc62b131eb1bd..66d9e99a351f5fc6cf58be3bee4397d9 } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0cab5746f 100644 +index 60fbed7a31fbeca07eae8ea6b0fb97705961bb7e..ef907eca610a8e00d70c9933e8b0d5e9f11afed9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -169,6 +169,7 @@ import org.bukkit.plugin.PluginManager; @@ -2171,12 +2172,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 this.remainingFireTicks = -this.getFireImmuneTicks(); this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); -@@ -945,10 +970,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - - public void checkBelowWorld() { - // Paper start - Configurable nether ceiling damage -- if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER -+ if (this.getY() < (double) (this.level.getMinBuildHeight() + level().purpurConfig.voidDamageHeight) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER // Purpur +@@ -951,6 +976,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { // Paper end - Configurable nether ceiling damage @@ -2184,7 +2180,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 this.onBelowWorld(); } -@@ -1867,7 +1893,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1869,7 +1895,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean fireImmune() { @@ -2193,7 +2189,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 } public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) { -@@ -1940,7 +1966,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1942,7 +1968,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.isInWater() || flag; } @@ -2202,7 +2198,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 Entity entity = this.getVehicle(); if (entity instanceof Boat entityboat) { -@@ -2586,6 +2612,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2588,6 +2614,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess nbttagcompound.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -2214,7 +2210,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2733,6 +2764,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2735,6 +2766,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess freezeLocked = nbt.getBoolean("Paper.FreezeLock"); } // Paper end @@ -2226,7 +2222,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); -@@ -2951,6 +2987,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2953,6 +2989,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (this.isAlive() && this instanceof Leashable leashable) { if (leashable.getLeashHolder() == player) { if (!this.level().isClientSide()) { @@ -2234,7 +2230,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 // CraftBukkit start - fire PlayerUnleashEntityEvent // Paper start - Expand EntityUnleashEvent org.bukkit.event.player.PlayerUnleashEntityEvent event = CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials()); -@@ -3154,6 +3191,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3156,6 +3193,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.passengers = ImmutableList.copyOf(list); } @@ -2248,7 +2244,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 this.gameEvent(GameEvent.ENTITY_MOUNT, passenger); } } -@@ -3193,6 +3237,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3195,6 +3239,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } // CraftBukkit end @@ -2263,7 +2259,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 if (this.passengers.size() == 1 && this.passengers.get(0) == entity) { this.passengers = ImmutableList.of(); } else { -@@ -3271,13 +3323,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3273,13 +3325,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Vec3.directionFromRotation(this.getRotationVector()); } @@ -2281,7 +2277,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 } else { this.portalProcess = new PortalProcessor(portal, pos.immutable()); } -@@ -3485,7 +3540,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3487,7 +3542,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public int getMaxAirSupply() { @@ -2290,7 +2286,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 } public int getAirSupply() { -@@ -3895,7 +3950,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3897,7 +3952,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public boolean canUsePortal(boolean allowVehicles) { @@ -2299,7 +2295,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 } public boolean canChangeDimensions(Level from, Level to) { -@@ -4217,6 +4272,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4219,6 +4274,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return SlotAccess.NULL; } @@ -2320,7 +2316,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 @Override public void sendSystemMessage(Component message) {} -@@ -4488,6 +4557,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4490,6 +4559,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Mth.lerp(delta, this.yRotO, this.yRot); } @@ -2333,7 +2329,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { if (false && this.touchingUnloadedChunk()) { // Gale - Airplane - reduce entity fluid lookups if no fluids - cost of a lookup here is the same cost as below, so skip return false; -@@ -4899,7 +4974,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4901,7 +4976,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public float maxUpStep() { @@ -2342,7 +2338,7 @@ index 0c5b0131df3e0a217c3422148c50e83ae8e80f07..983cef713678772bce715436471d3ef0 } public void onExplosionHit(@Nullable Entity entity) {} -@@ -5091,4 +5166,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5093,4 +5168,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); } // Paper end - Expose entity id counter @@ -2526,7 +2522,7 @@ index 09fdea983772612ef3fff6b2da3cf469a34e4ec0..b69d924fa8034eabbf4aab8d3434f4f4 protected ParticleOptions getInkParticle() { return ParticleTypes.GLOW_SQUID_INK; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 93fae6169e06cbb4bfbff194ccddf51a5c190d28..568d12f93954c1346210d0d031cf026453fd86c4 100644 +index 1f53cc73dca25ed82b08d1a2f46236a8919af7fb..fe4e2c344a85a9cd0608d5d86b62a43a4b038ffa 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -236,9 +236,9 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2749,15 +2745,6 @@ index 93fae6169e06cbb4bfbff194ccddf51a5c190d28..568d12f93954c1346210d0d031cf0264 } // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops, () -> { -@@ -2669,7 +2733,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - - @Override - protected void onBelowWorld() { -- this.hurt(this.damageSources().fellOutOfWorld(), 4.0F); -+ this.hurt(this.damageSources().fellOutOfWorld(), (float) level().purpurConfig.voidDamageDealt); // Purpur - } - - protected void updateSwingTime() { @@ -3027,6 +3091,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (f3 > 0.0F) { @@ -17010,10 +16997,10 @@ index 5dbaaa949976051d7926fe24203777bd66f9189c..91548197ef6665e271a9104fd2cb8a3a + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a62b2753945f54e435796f0fbf330945a5561286..3b3ad96abc07010291965091a35546af30eb1119 100644 +index d59a65c35da65196b3487da08707267e2ca48a65..c701687e964477b34cd73e614d3ec31d3f11f218 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2345,6 +2345,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2386,6 +2386,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); } @@ -18490,10 +18477,10 @@ index 0000000000000000000000000000000000000000..83fabd290d3c64f2766b3244f5cd695e +} diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..57814f424a91ac5eb5e7c7fa5fe8c23625895c8c +index 0000000000000000000000000000000000000000..bdf39717d78f3a7867b6e3586f11b594e2c54f1f --- /dev/null +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -0,0 +1,3447 @@ +@@ -0,0 +1,3443 @@ +package org.purpurmc.purpur; + +import net.minecraft.core.registries.BuiltInRegistries; @@ -18631,8 +18618,6 @@ index 0000000000000000000000000000000000000000..57814f424a91ac5eb5e7c7fa5fe8c236 + public boolean tickFluids = true; + public double mobsBlindnessMultiplier = 1; + public double tridentLoyaltyVoidReturnHeight = 0.0D; -+ public double voidDamageHeight = -64.0D; -+ public double voidDamageDealt = 4.0D; + public int raidCooldownSeconds = 0; + public int animalBreedingCooldownSeconds = 0; + public boolean mobsIgnoreRails = false; @@ -18668,8 +18653,6 @@ index 0000000000000000000000000000000000000000..57814f424a91ac5eb5e7c7fa5fe8c236 + 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); -+ voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight); -+ voidDamageDealt = getDouble("gameplay-mechanics.void-damage-dealt", voidDamageDealt); + raidCooldownSeconds = getInt("gameplay-mechanics.raid-cooldown-seconds", raidCooldownSeconds); + animalBreedingCooldownSeconds = getInt("gameplay-mechanics.animal-breeding-cooldown-seconds", animalBreedingCooldownSeconds); + mobsIgnoreRails = getBoolean("gameplay-mechanics.mobs-ignore-rails", mobsIgnoreRails); diff --git a/patches/server/0017-Remove-vanilla-username-check.patch b/patches/server/0017-Remove-vanilla-username-check.patch index 48cfdbbe..d752ea86 100644 --- a/patches/server/0017-Remove-vanilla-username-check.patch +++ b/patches/server/0017-Remove-vanilla-username-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove vanilla username check diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -index 9a7add1a7b137a0c9ca9c69fec674a7720d954eb..7797c4ec493e0421748cc2e623033c9f028d8e88 100644 +index 8849862b45ccbbc635a1c316e9870bca81e55c04..5886e395f0b3b5837088bf97bf20ce13781cc5d3 100644 --- a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -@@ -293,7 +293,7 @@ public class CraftPlayerProfile implements PlayerProfile, SharedPlayerProfile { +@@ -295,7 +295,7 @@ public class CraftPlayerProfile implements PlayerProfile, SharedPlayerProfile { private static GameProfile createAuthLibProfile(UUID uniqueId, String name) { Preconditions.checkArgument(name == null || name.length() <= 16, "Name cannot be longer than 16 characters"); diff --git a/patches/server/0046-Configurable-movement-speed-of-more-entities.patch b/patches/server/0046-Configurable-movement-speed-of-more-entities.patch index 63f5b980..5a11a8fe 100644 --- a/patches/server/0046-Configurable-movement-speed-of-more-entities.patch +++ b/patches/server/0046-Configurable-movement-speed-of-more-entities.patch @@ -29,7 +29,7 @@ index a9285aac811067313c5609d2d5708783736e6cb5..53114ceb212ea341b227f59ebd302d7c @Override 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 4578fc25456361b76c9821f066fd8a628cd4bd67..5e8f565511751509d1d9c47cd0583bcfbed9b63f 100644 +index 77cc311e2b9aea6cb4d014fa93aac2d362bc8cd3..ac9a63c70b5ddfb528eff559ca1464051d8865f4 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -130,6 +130,7 @@ public class Zombie extends Monster { @@ -97,10 +97,10 @@ index 1c04fbea0dce4167a0902b92b95d470f562825c2..4f1f816496f8f8564c1dc53ceae5cfb3 @Override public EntityDimensions getDefaultDimensions(Pose pose) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27abafe6fc 100644 +index bdf39717d78f3a7867b6e3586f11b594e2c54f1f..7fd05a585705234d9b025281bd54671b6bb1d97e 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1579,6 +1579,7 @@ public class PurpurWorldConfig { +@@ -1575,6 +1575,7 @@ public class PurpurWorldConfig { public boolean drownedTakeDamageFromWater = false; public boolean drownedBreakDoors = false; public boolean drownedAlwaysDropExp = false; @@ -108,7 +108,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 private void drownedSettings() { drownedRidable = getBoolean("mobs.drowned.ridable", drownedRidable); drownedRidableInWater = getBoolean("mobs.drowned.ridable-in-water", drownedRidableInWater); -@@ -1597,6 +1598,7 @@ public class PurpurWorldConfig { +@@ -1593,6 +1594,7 @@ public class PurpurWorldConfig { drownedTakeDamageFromWater = getBoolean("mobs.drowned.takes-damage-from-water", drownedTakeDamageFromWater); drownedBreakDoors = getBoolean("mobs.drowned.can-break-doors", drownedBreakDoors); drownedAlwaysDropExp = getBoolean("mobs.drowned.always-drop-exp", drownedAlwaysDropExp); @@ -116,7 +116,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 } public boolean elderGuardianRidable = false; -@@ -1966,6 +1968,7 @@ public class PurpurWorldConfig { +@@ -1962,6 +1964,7 @@ public class PurpurWorldConfig { public boolean huskJockeyTryExistingChickens = true; public boolean huskTakeDamageFromWater = false; public boolean huskAlwaysDropExp = false; @@ -124,7 +124,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 private void huskSettings() { huskRidable = getBoolean("mobs.husk.ridable", huskRidable); huskRidableInWater = getBoolean("mobs.husk.ridable-in-water", huskRidableInWater); -@@ -1983,6 +1986,7 @@ public class PurpurWorldConfig { +@@ -1979,6 +1982,7 @@ public class PurpurWorldConfig { huskJockeyTryExistingChickens = getBoolean("mobs.husk.jockey.try-existing-chickens", huskJockeyTryExistingChickens); huskTakeDamageFromWater = getBoolean("mobs.husk.takes-damage-from-water", huskTakeDamageFromWater); huskAlwaysDropExp = getBoolean("mobs.husk.always-drop-exp", huskAlwaysDropExp); @@ -132,7 +132,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 } public boolean illusionerRidable = false; -@@ -3276,6 +3280,7 @@ public class PurpurWorldConfig { +@@ -3272,6 +3276,7 @@ public class PurpurWorldConfig { public boolean zombieTakeDamageFromWater = false; public boolean zombieAlwaysDropExp = false; public double zombieHeadVisibilityPercent = 0.5D; @@ -140,7 +140,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 private void zombieSettings() { zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable); zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater); -@@ -3296,6 +3301,7 @@ public class PurpurWorldConfig { +@@ -3292,6 +3297,7 @@ public class PurpurWorldConfig { zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater); zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp); zombieHeadVisibilityPercent = getDouble("mobs.zombie.head-visibility-percent", zombieHeadVisibilityPercent); @@ -148,7 +148,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 } public boolean zombieHorseRidable = false; -@@ -3345,6 +3351,7 @@ public class PurpurWorldConfig { +@@ -3341,6 +3347,7 @@ public class PurpurWorldConfig { public int zombieVillagerCuringTimeMax = 6000; public boolean zombieVillagerCureEnabled = true; public boolean zombieVillagerAlwaysDropExp = false; @@ -156,7 +156,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 private void zombieVillagerSettings() { zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable); zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater); -@@ -3365,6 +3372,7 @@ public class PurpurWorldConfig { +@@ -3361,6 +3368,7 @@ public class PurpurWorldConfig { zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax); zombieVillagerCureEnabled = getBoolean("mobs.zombie_villager.cure.enabled", zombieVillagerCureEnabled); zombieVillagerAlwaysDropExp = getBoolean("mobs.zombie_villager.always-drop-exp", zombieVillagerAlwaysDropExp); @@ -164,7 +164,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 } public boolean zombifiedPiglinRidable = false; -@@ -3379,6 +3387,7 @@ public class PurpurWorldConfig { +@@ -3375,6 +3383,7 @@ public class PurpurWorldConfig { public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = true; public boolean zombifiedPiglinTakeDamageFromWater = false; public boolean zombifiedPiglinAlwaysDropExp = false; @@ -172,7 +172,7 @@ index 57814f424a91ac5eb5e7c7fa5fe8c23625895c8c..4d438781d264d8a7fbda4d8913b84f27 private void zombifiedPiglinSettings() { zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable); zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater); -@@ -3397,6 +3406,7 @@ public class PurpurWorldConfig { +@@ -3393,6 +3402,7 @@ 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); zombifiedPiglinAlwaysDropExp = getBoolean("mobs.zombified_piglin.always-drop-exp", zombifiedPiglinAlwaysDropExp); diff --git a/patches/server/0051-Plazma-Add-missing-purpur-configuration-options.patch b/patches/server/0051-Plazma-Add-missing-purpur-configuration-options.patch index c8a927fd..5f5a8225 100644 --- a/patches/server/0051-Plazma-Add-missing-purpur-configuration-options.patch +++ b/patches/server/0051-Plazma-Add-missing-purpur-configuration-options.patch @@ -231,10 +231,10 @@ index 83fabd290d3c64f2766b3244f5cd695e1c674a2f..69832f436254d975a77e251e6ae5de2e org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 4d438781d264d8a7fbda4d8913b84f27abafe6fc..97fae82daa11ef2002c342a3a337611ec3d80395 100644 +index 7fd05a585705234d9b025281bd54671b6bb1d97e..149c29ef696ebd8cf7d514e17262ccff444581be 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1166,12 +1166,20 @@ public class PurpurWorldConfig { +@@ -1162,12 +1162,20 @@ public class PurpurWorldConfig { public boolean allayControllable = true; public double allayMaxHealth = 20.0D; public double allayScale = 1.0D; @@ -255,7 +255,7 @@ index 4d438781d264d8a7fbda4d8913b84f27abafe6fc..97fae82daa11ef2002c342a3a337611e } public boolean armadilloRidable = false; -@@ -1321,6 +1329,10 @@ public class PurpurWorldConfig { +@@ -1317,6 +1325,10 @@ public class PurpurWorldConfig { public double camelMovementSpeedMin = 0.09D; public double camelMovementSpeedMax = 0.09D; public int camelBreedingTicks = 6000; @@ -266,7 +266,7 @@ index 4d438781d264d8a7fbda4d8913b84f27abafe6fc..97fae82daa11ef2002c342a3a337611e private void camelSettings() { camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater); camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin); -@@ -1330,6 +1342,10 @@ public class PurpurWorldConfig { +@@ -1326,6 +1338,10 @@ public class PurpurWorldConfig { camelMovementSpeedMin = getDouble("mobs.camel.attributes.movement_speed.min", camelMovementSpeedMin); camelMovementSpeedMax = getDouble("mobs.camel.attributes.movement_speed.max", camelMovementSpeedMax); camelBreedingTicks = getInt("mobs.camel.breeding-delay-ticks", camelBreedingTicks); @@ -277,7 +277,7 @@ index 4d438781d264d8a7fbda4d8913b84f27abafe6fc..97fae82daa11ef2002c342a3a337611e } public boolean catRidable = false; -@@ -1777,12 +1793,22 @@ public class PurpurWorldConfig { +@@ -1773,12 +1789,22 @@ public class PurpurWorldConfig { public boolean frogControllable = true; public float frogRidableJumpHeight = 0.65F; public int frogBreedingTicks = 6000; @@ -300,7 +300,7 @@ index 4d438781d264d8a7fbda4d8913b84f27abafe6fc..97fae82daa11ef2002c342a3a337611e } public boolean ghastRidable = false; -@@ -2784,6 +2810,10 @@ public class PurpurWorldConfig { +@@ -2780,6 +2806,10 @@ public class PurpurWorldConfig { public double snifferMaxHealth = 14.0D; public double snifferScale = 1.0D; public int snifferBreedingTicks = 6000; @@ -311,7 +311,7 @@ index 4d438781d264d8a7fbda4d8913b84f27abafe6fc..97fae82daa11ef2002c342a3a337611e private void snifferSettings() { snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable); snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater); -@@ -2791,6 +2821,10 @@ public class PurpurWorldConfig { +@@ -2787,6 +2817,10 @@ public class PurpurWorldConfig { snifferMaxHealth = getDouble("mobs.sniffer.attributes.max_health", snifferMaxHealth); snifferScale = Mth.clamp(getDouble("mobs.sniffer.attributes.scale", snifferScale), 0.0625D, 16.0D); snifferBreedingTicks = getInt("mobs.sniffer.breeding-delay-ticks", snifferBreedingTicks); @@ -322,7 +322,7 @@ index 4d438781d264d8a7fbda4d8913b84f27abafe6fc..97fae82daa11ef2002c342a3a337611e } public boolean squidRidable = false; -@@ -2892,10 +2926,20 @@ public class PurpurWorldConfig { +@@ -2888,10 +2922,20 @@ public class PurpurWorldConfig { public boolean tadpoleRidable = false; public boolean tadpoleRidableInWater = true; public boolean tadpoleControllable = true; @@ -343,7 +343,7 @@ index 4d438781d264d8a7fbda4d8913b84f27abafe6fc..97fae82daa11ef2002c342a3a337611e } public boolean traderLlamaRidable = false; -@@ -3120,10 +3164,20 @@ public class PurpurWorldConfig { +@@ -3116,10 +3160,20 @@ public class PurpurWorldConfig { public boolean wardenRidable = false; public boolean wardenRidableInWater = true; public boolean wardenControllable = true; diff --git a/patches/server/0093-Optimize-check-nearby-fire-or-lava-on-entity-move.patch b/patches/server/0093-Optimize-check-nearby-fire-or-lava-on-entity-move.patch index c0532b2d..6c28897c 100644 --- a/patches/server/0093-Optimize-check-nearby-fire-or-lava-on-entity-move.patch +++ b/patches/server/0093-Optimize-check-nearby-fire-or-lava-on-entity-move.patch @@ -7,10 +7,10 @@ Remove stream and remove double Mth.floor() convert before 1700ms, after 370ms, in massive stacked minecart test diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 320dfb1b173fcada320010a9d2bdeccdc4e2548b..9514b809a7e652cd8f384854aabc38d6d3fbcca3 100644 +index 15ca5a879ba9a14d29b9f7fd15d8189d8e6f29a7..7aa4c9ff9b376b25aad25d45602d27db0f1817ea 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1337,9 +1337,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1339,9 +1339,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } // Gale end - skip negligible planar movement multiplication @@ -26,7 +26,7 @@ index 320dfb1b173fcada320010a9d2bdeccdc4e2548b..9514b809a7e652cd8f384854aabc38d6 if (this.remainingFireTicks <= 0) { this.setRemainingFireTicks(-this.getFireImmuneTicks()); } -@@ -1363,6 +1366,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1365,6 +1368,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper end - detailed watchdog information } diff --git a/patches/server/0099-Paper-PR-Throttle-failed-spawn-attempts.patch b/patches/server/0099-Paper-PR-Throttle-failed-spawn-attempts.patch index 58ef381f..725cf225 100644 --- a/patches/server/0099-Paper-PR-Throttle-failed-spawn-attempts.patch +++ b/patches/server/0099-Paper-PR-Throttle-failed-spawn-attempts.patch @@ -31,10 +31,10 @@ vain. Throttling spawn attempts in suspected spawnproof chunks improves performance without noticeably advantaging or disadvantaging the mob farm. diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -index 790e3167cfa2511ef2fc707d9b9aa681a78d8ba0..3b5fedf1beff02b8cb7f056b512735e078864c48 100644 +index fd3b1c10695634f65c7291016bf671c084bc4d57..d97a534cb878e0ff7520232f70d83d02b27bf26a 100644 --- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -@@ -189,6 +189,15 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -190,6 +190,15 @@ public class WorldConfiguration extends ConfigurationPart { @MergeMap public Reference2IntMap ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));