From 0d074fcfc9b8ca747fb95707ff78c9853673b4fc Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Mon, 4 Oct 2021 22:14:11 -0500 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6722) --- .../Add-Plugin-Tickets-to-API-Chunk-Methods.patch | 2 +- .../Add-paper-mobcaps-and-paper-playermobcaps.patch | 6 ++++++ patches/server/Adventure.patch | 2 +- patches/server/Entity-Activation-Range-2.0.patch | 2 +- ...nlla-default-mob-spawn-range-and-water-ani.patch | 13 ------------- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 8 files changed, 12 insertions(+), 19 deletions(-) diff --git a/patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch index ca791146f5..29efeb8e31 100644 --- a/patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.loadIcon(); } @@ -0,0 +0,0 @@ public final class CraftServer implements Server { - this.waterAmbientSpawn = this.configuration.getInt("spawn-limits.water-ambient"); + this.waterUndergroundCreatureSpawn = this.configuration.getInt("spawn-limits.water-underground-creature"); this.ambientSpawn = this.configuration.getInt("spawn-limits.ambient"); this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose")); - TicketType.PLUGIN.timeout = this.configuration.getInt("chunk-gc.period-in-ticks"); diff --git a/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch index 6f90598837..6b229c7dd0 100644 --- a/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -292,6 +292,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - spawnThisTick = spawnWaterThisTick; - limit = world.getWorld().getWaterAnimalSpawnLimit(); - break; +- case UNDERGROUND_WATER_CREATURE: +- spawnThisTick = spawnWaterUndergroundCreatureThisTick; +- limit = world.getWorld().getWaterUndergroundCreatureSpawnLimit(); +- break; - case AMBIENT: - spawnThisTick = spawnAmbientThisTick; - limit = world.getWorld().getAmbientSpawnLimit(); @@ -304,6 +308,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + case MONSTER -> spawnThisTick = spawnMonsterThisTick; + case CREATURE -> spawnThisTick = spawnAnimalThisTick; + case WATER_CREATURE -> spawnThisTick = spawnWaterThisTick; ++ case UNDERGROUND_WATER_CREATURE -> spawnThisTick = spawnWaterUndergroundCreatureThisTick; + case AMBIENT -> spawnThisTick = spawnAmbientThisTick; + case WATER_AMBIENT -> spawnThisTick = spawnWaterAmbientThisTick; + // Paper end @@ -320,6 +325,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + case MONSTER -> world.getWorld().getMonsterSpawnLimit(); + case CREATURE -> world.getWorld().getAnimalSpawnLimit(); + case WATER_CREATURE -> world.getWorld().getWaterAnimalSpawnLimit(); ++ case UNDERGROUND_WATER_CREATURE -> world.getWorld().getWaterUndergroundCreatureSpawnLimit(); + case AMBIENT -> world.getWorld().getAmbientSpawnLimit(); + case WATER_AMBIENT -> world.getWorld().getWaterAmbientSpawnLimit(); + default -> enumcreaturetype.getMaxInstancesPerChunk(); diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 86a3368c3a..9df5fa0f04 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -1859,8 +1859,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld extends CraftRegionAccessor implements World { - private int waterAnimalSpawn = -1; private int waterAmbientSpawn = -1; + private int waterUndergroundCreatureSpawn = -1; private int ambientSpawn = -1; + private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers diff --git a/patches/server/Entity-Activation-Range-2.0.patch b/patches/server/Entity-Activation-Range-2.0.patch index 7967d81613..5b99a05e67 100644 --- a/patches/server/Entity-Activation-Range-2.0.patch +++ b/patches/server/Entity-Activation-Range-2.0.patch @@ -323,8 +323,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -0,0 +0,0 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - public long ticksPerWaterSpawns; public long ticksPerWaterAmbientSpawns; + public long ticksPerWaterUndergroundCreatureSpawns; public long ticksPerAmbientSpawns; + // Paper start + public int wakeupInactiveRemainingAnimals; diff --git a/patches/server/Restore-vanlla-default-mob-spawn-range-and-water-ani.patch b/patches/server/Restore-vanlla-default-mob-spawn-range-and-water-ani.patch index 749d0e558f..41459f06d3 100644 --- a/patches/server/Restore-vanlla-default-mob-spawn-range-and-water-ani.patch +++ b/patches/server/Restore-vanlla-default-mob-spawn-range-and-water-ani.patch @@ -18,16 +18,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.log( "Mob Spawn Range: " + this.mobSpawnRange ); } -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -0,0 +0,0 @@ settings: - spawn-limits: - monsters: 70 - animals: 10 -- water-animals: 15 -+ water-animals: 5 - water-ambient: 20 - ambient: 15 - chunk-gc: diff --git a/work/Bukkit b/work/Bukkit index 19e985ecaf..6be36d3638 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 19e985ecaf424e77845a8e136b7e17b94e8a65ee +Subproject commit 6be36d3638f97e6e0dc053f3e0fd0e68e8ec93f0 diff --git a/work/CraftBukkit b/work/CraftBukkit index dc764e7a2f..1df303e707 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit dc764e7a2f9272e72a3f37c6770c9c0f7ea83d43 +Subproject commit 1df303e70742418fd30760a750a9545f3dea5b9b diff --git a/work/Spigot b/work/Spigot index 6c1c1b2650..8e907441bd 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 6c1c1b2650e2f166fbba2f670ab37af8ce20156d +Subproject commit 8e907441bde900ddc564d3a5fac831287a1a8b75