diff options
author | Warrior <[email protected]> | 2023-10-04 20:08:47 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-04 10:08:47 -0700 |
commit | 02cfaa8ff81fed20f4c635d8ccf344083d938973 (patch) | |
tree | d0f8e38f1796885f3fa744c0f8d0c0b2e4ed6026 | |
parent | 5eec4ec3bfce1cf8405cb71253d6235da9d1e961 (diff) | |
download | Paper-02cfaa8ff81fed20f4c635d8ccf344083d938973.tar.gz Paper-02cfaa8ff81fed20f4c635d8ccf344083d938973.zip |
Fix mobs not spawning when using an older config (#9793)
-rw-r--r-- | patches/server/0005-Paper-config-files.patch | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index 7ad8e77177..9c15e266b1 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -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 |