mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: cf82dad3 Fix Non Full Status Chunk NBT Memory Leak 5a12515a Update Log4J Configuration file to stop truncating stack traces 7c001d64 More Improvements to Chunks e1c45196 Fix high memory use of non ticking chunks ee9f0d51 Fix another case of breaking blocks causing sync chunk loads 6009ba8f Drop AABB limit patch until it can be tested more 0e9c24e5 Fix log spam about Hanging entities bounding boxes 83fadad7 Fix conversion for deserializing raw nbt itemstacks - Fixes #3424 4d38ee11 Many fixes and improvements to chunk prioritization 281181c7 Use saner Entity bounding box limits edd6b6a2 Protect the visible chunk map from plugins touching it, trim Timing Errors 18c68657 Optimize performance of object pool 7e1525ea Many improvements to chunk prioritization and bug fixes c82b292a Fix pooled buffer leak resulting in dynmap black spots - Fixes #3386 63274472 Fix ./paper edit continue for Windows eb5a3058 Fix path in CONTRIBUTING.md (#3406) f6ed326d Fix a small error in CONTRIBUTING.md (#3403) 614a664b Implement Chunk Priority / Urgency System for Chunks
54 lines
2.1 KiB
Diff
54 lines
2.1 KiB
Diff
From 24c75bc95d5b36139730c743f4d32357295f90c6 Mon Sep 17 00:00:00 2001
|
|
From: chase <chasewhip20@gmail.com>
|
|
Date: Sun, 15 Mar 2020 18:32:22 -0600
|
|
Subject: [PATCH] PaperPR - Per World Spawn limits
|
|
|
|
---
|
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 11 +++++++++++
|
|
src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 7 +++++++
|
|
2 files changed, 18 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 7e7f10351..f2281d325 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -313,6 +313,17 @@ public class PurpurWorldConfig {
|
|
idleTimeoutUpdateTabList = getBoolean("gameplay-mechanics.player.idle-timeout.update-tab-list", idleTimeoutUpdateTabList);
|
|
}
|
|
|
|
+ public int spawnLimitMonsters;
|
|
+ public int spawnLimitAnimals;
|
|
+ public int spawnLimitWaterAnimals;
|
|
+ public int spawnLimitAmbient;
|
|
+ private void perWorldSpawnLimit(){
|
|
+ spawnLimitMonsters = getInt("spawn-limits.monsters", -1);
|
|
+ spawnLimitAnimals = getInt("spawn-limits.animals", -1);
|
|
+ spawnLimitWaterAnimals = getInt("spawn-limits.water-animals", -1);
|
|
+ spawnLimitAmbient = getInt("spawn-limits.ambient", -1);
|
|
+ }
|
|
+
|
|
public boolean batRidable = false;
|
|
public boolean batRidableInWater = false;
|
|
public boolean batRequireShiftToMount = true;
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index 4ba2ec7df..066b07f5a 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -333,6 +333,13 @@ public class CraftWorld implements World {
|
|
this.generator = gen;
|
|
|
|
environment = env;
|
|
+
|
|
+ // Purpur start
|
|
+ monsterSpawn = world.purpurConfig.spawnLimitMonsters;
|
|
+ animalSpawn = world.purpurConfig.spawnLimitAnimals;
|
|
+ waterAnimalSpawn = world.purpurConfig.spawnLimitWaterAnimals;
|
|
+ ambientSpawn = world.purpurConfig.spawnLimitAmbient;
|
|
+ // Purpur end
|
|
}
|
|
|
|
@Override
|
|
--
|
|
2.24.0
|
|
|