aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0645-Entity-load-save-limit-per-chunk.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2021-11-08 23:59:15 -0800
committerGitHub <[email protected]>2021-11-08 23:59:15 -0800
commita923e332ee20bbbe6319c361496c9ea5728b4d08 (patch)
treef397940e6ff621e34a85828f8fd153662333fad4 /patches/server/0645-Entity-load-save-limit-per-chunk.patch
parent87121cef2912bfbaf514fdbfea75509af531de8a (diff)
downloadPaper-a923e332ee20bbbe6319c361496c9ea5728b4d08.tar.gz
Paper-a923e332ee20bbbe6319c361496c9ea5728b4d08.zip
Make despawn distance configs per-category, improve per category spawn limit config (#6717)
Also adds per-world spawn limit config in paper.yml for `underground_water_creature`, and migrates existing spawn limit config options to their Mojang names.
Diffstat (limited to 'patches/server/0645-Entity-load-save-limit-per-chunk.patch')
-rw-r--r--patches/server/0645-Entity-load-save-limit-per-chunk.patch15
1 files changed, 7 insertions, 8 deletions
diff --git a/patches/server/0645-Entity-load-save-limit-per-chunk.patch b/patches/server/0645-Entity-load-save-limit-per-chunk.patch
index 5f0a7aed5e..f69353f8da 100644
--- a/patches/server/0645-Entity-load-save-limit-per-chunk.patch
+++ b/patches/server/0645-Entity-load-save-limit-per-chunk.patch
@@ -9,15 +9,14 @@ defaults are only included for certain entites, this allows setting
limits for any entity type.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-index 1da69d56f0b58708d4c85e76307b725221f9caed..5eeb09c7cbc743c4273a6d02d9f0c357c2724ba2 100644
+index 723bf8c37494a11b5e6cccc22a2c125c5cba3c01..0938b38aaca2bfaf3a70c392849222fc0128c60c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-@@ -1,9 +1,12 @@
- package com.destroystokyo.paper;
-
- import java.util.Arrays;
+@@ -6,8 +6,11 @@ import java.util.List;
+ import it.unimi.dsi.fastutil.objects.Reference2IntMap;
+ import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap;
+ import net.minecraft.world.entity.MobCategory;
+import java.util.HashMap;
- import java.util.List;
+import java.util.Map;
import java.util.stream.Collectors;
import net.minecraft.world.Difficulty;
@@ -25,7 +24,7 @@ index 1da69d56f0b58708d4c85e76307b725221f9caed..5eeb09c7cbc743c4273a6d02d9f0c357
import net.minecraft.world.entity.monster.Vindicator;
import net.minecraft.world.entity.monster.Zombie;
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode;
-@@ -123,6 +126,38 @@ public class PaperWorldConfig {
+@@ -143,6 +146,38 @@ public class PaperWorldConfig {
);
}
@@ -90,7 +89,7 @@ index 8c829066939a4069953097fd268f7c214a555779..1c446dba5de89698397041ee38a2e1a0
return entity;
});
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
-index 50afe31798664b2e0ac7546d775ecea534e351e2..0e13a1f898a793799416056bd468851013f9c5cb 100644
+index 04aecfbafa2840755b8b025d5605205cc7f821cf..bab6e0ac7b57a86ff36e8caf1014f1625ca976b6 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
@@ -107,7 +107,18 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {