Skip to content

Commit

Permalink
Filter useless entity type for ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Aug 9, 2024
1 parent d8c2bb9 commit 5692cf0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions patches/server/0010-Pufferfish-Entity-TTL.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
+ }
Expand Down

0 comments on commit 5692cf0

Please sign in to comment.