From 5692cf05211b306f4537aa2cb8179f5b7b93e697 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Fri, 9 Aug 2024 19:52:06 +0800 Subject: [PATCH] Filter useless entity type for ttl --- patches/server/0010-Pufferfish-Entity-TTL.patch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/patches/server/0010-Pufferfish-Entity-TTL.patch b/patches/server/0010-Pufferfish-Entity-TTL.patch index ab54e2a24..78659f125 100644 --- a/patches/server/0010-Pufferfish-Entity-TTL.patch +++ b/patches/server/0010-Pufferfish-Entity-TTL.patch @@ -37,10 +37,10 @@ index b2d8a858d8767bd6ca52e0b8db84757986c6ed61..f9440014ab2fe753c16b9383f5fffbb8 @Nullable diff --git a/src/main/java/org/dreeam/leaf/config/modules/opt/EntityTTL.java b/src/main/java/org/dreeam/leaf/config/modules/opt/EntityTTL.java new file mode 100644 -index 0000000000000000000000000000000000000000..d76b50e535af2dd4cfbf068ec6d72a2138d48f89 +index 0000000000000000000000000000000000000000..656655343653b1854a93fb074c4fa04bda98754d --- /dev/null +++ b/src/main/java/org/dreeam/leaf/config/modules/opt/EntityTTL.java -@@ -0,0 +1,32 @@ +@@ -0,0 +1,36 @@ +package org.dreeam.leaf.config.modules.opt; + +import net.minecraft.core.registries.BuiltInRegistries; @@ -68,6 +68,10 @@ index 0000000000000000000000000000000000000000..d76b50e535af2dd4cfbf068ec6d72a21 + config.getInt(getBasePath() + ".SNOWBALL", -1); + config.getInt(getBasePath() + ".LLAMA_SPIT", -1); + for (EntityType entityType : BuiltInRegistries.ENTITY_TYPE) { ++ if (entityType == EntityType.PLAYER) { ++ continue; ++ } ++ + String type = EntityType.getKey(entityType).getPath().toUpperCase(Locale.ROOT); + entityType.ttl = config.getInt(getBasePath() + "." + type, -1); + }