2014-06-22 22:32:38 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
2016-03-01 00:09:49 +01:00
|
|
|
Date: Tue, 1 Mar 2016 12:45:11 -0600
|
2014-06-22 22:32:38 +02:00
|
|
|
Subject: [PATCH] Configurable squid spawn ranges
|
|
|
|
|
|
|
|
|
2016-03-01 00:09:49 +01:00
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2017-03-25 04:18:58 +01:00
|
|
|
index 621bf7051..f24839378 100644
|
2016-03-01 00:09:49 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
|
|
|
config.addDefault("world-settings.default." + path, def);
|
|
|
|
return config.getString("world-settings." + worldName + "." + path, config.getString("world-settings.default." + path));
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public double squidMinSpawnHeight;
|
|
|
|
+ public double squidMaxSpawnHeight;
|
|
|
|
+ private void squidSpawnHeights() {
|
|
|
|
+ squidMinSpawnHeight = getDouble("squid-spawn-height.minimum", 45.0D);
|
|
|
|
+ squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 63.0D);
|
|
|
|
+ log("Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight);
|
|
|
|
+ }
|
|
|
|
}
|
2014-06-22 22:32:38 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
|
2017-05-14 20:05:01 +02:00
|
|
|
index 20b71b455..ee8e50706 100644
|
2014-06-22 22:32:38 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntitySquid.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
|
|
|
|
@@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal {
|
|
|
|
}
|
|
|
|
|
2017-05-14 20:05:01 +02:00
|
|
|
public boolean P() {
|
|
|
|
- return this.locY > 45.0D && this.locY < (double) this.world.getSeaLevel() && super.P();
|
|
|
|
+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.P(); // Paper - Configurable squid spawn height range
|
2014-06-22 22:32:38 +02:00
|
|
|
}
|
2014-11-28 02:17:45 +01:00
|
|
|
|
|
|
|
public void b(float f, float f1, float f2) {
|
2015-03-08 02:16:09 +01:00
|
|
|
--
|