Fix mobs not spawning when using an older config (#9793)

This commit is contained in:
Warrior 2023-10-04 20:08:47 +03:00 committed by GitHub
parent 5eec4ec3bf
commit 02cfaa8ff8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4600,12 +4600,13 @@ index 0000000000000000000000000000000000000000..5833c06b0707906ab7d10786ecd115f2
+
diff --git a/src/main/java/io/papermc/paper/configuration/type/number/IntOr.java b/src/main/java/io/papermc/paper/configuration/type/number/IntOr.java
new file mode 100644
index 0000000000000000000000000000000000000000..c43bc4d013b48ee367160be6514af1a574c2390c
index 0000000000000000000000000000000000000000..09f16e5dde565801b153bd6705637c5f71427c8a
--- /dev/null
+++ b/src/main/java/io/papermc/paper/configuration/type/number/IntOr.java
@@ -0,0 +1,79 @@
@@ -0,0 +1,81 @@
+package io.papermc.paper.configuration.type.number;
+
+import com.google.common.base.Preconditions;
+import com.mojang.logging.LogUtils;
+import java.util.OptionalInt;
+import java.util.function.Function;
@ -4669,7 +4670,8 @@ index 0000000000000000000000000000000000000000..c43bc4d013b48ee367160be6514af1a5
+
+ @Override
+ protected boolean belowZero(final OptionalInt value) {
+ return false;
+ Preconditions.checkArgument(value.isPresent());
+ return value.getAsInt() < 0;
+ }
+
+ @Override