mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
Fix mobs not spawning when using an older config (#9793)
This commit is contained in:
parent
5eec4ec3bf
commit
02cfaa8ff8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user