2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Thu, 11 Jan 2018 16:47:28 -0600
|
|
|
|
Subject: [PATCH] Make max squid spawn height configurable
|
|
|
|
|
|
|
|
I don't know why upstream made only the minimum height configurable but
|
|
|
|
whatever
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-09-01 11:54:41 +02:00
|
|
|
index e6c29e08b20734c3f64e1d596d103a5c1fbb6920..b6e762fbb79d19affb93e10ed0cbe29c2d0b6c22 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-09-01 11:54:41 +02:00
|
|
|
@@ -347,4 +347,9 @@ public class PaperWorldConfig {
|
2021-06-12 17:06:20 +02:00
|
|
|
disableCreeperLingeringEffect = getBoolean("disable-creeper-lingering-effect", false);
|
|
|
|
log("Creeper lingering effect: " + disableCreeperLingeringEffect);
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public double squidMaxSpawnHeight;
|
|
|
|
+ private void squidMaxSpawnHeight() {
|
|
|
|
+ squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
2021-10-05 05:14:11 +02:00
|
|
|
index 3ffc1ee8a9ae63c8678c12736fab5d6ba0a21a5b..4da560f6e4da0750bda78b900b2d916d58adfccb 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
2021-06-12 17:06:20 +02:00
|
|
|
@@ -211,7 +211,8 @@ public class Squid extends WaterAnimal {
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public static boolean checkSquidSpawnRules(EntityType<Squid> type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, Random random) {
|
2021-06-12 17:06:20 +02:00
|
|
|
- return pos.getY() > world.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && pos.getY() < world.getSeaLevel(); // Spigot
|
|
|
|
+ final double maxHeight = world.getMinecraftWorld().paperConfig.squidMaxSpawnHeight > 0 ? world.getMinecraftWorld().paperConfig.squidMaxSpawnHeight : world.getSeaLevel(); // Paper
|
|
|
|
+ return pos.getY() > world.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && pos.getY() < maxHeight; // Spigot // Paper
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
2021-06-12 17:06:20 +02:00
|
|
|
@Override
|