mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
Filter useless entity type for ttl
This commit is contained in:
@@ -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);
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user