2017-03-25 06:22:02 +01:00
|
|
|
From ffac25bb34932ef90c85baca9c77303e9ccf3702 Mon Sep 17 00:00:00 2001
|
2016-03-01 00:09:49 +01:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Tue, 1 Mar 2016 12:45:11 -0600
|
|
|
|
Subject: [PATCH] Configurable squid spawn ranges
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2017-03-25 04:18:58 +01:00
|
|
|
@@ -63,4 +63,12 @@ public class PaperWorldConfig {
|
2016-03-01 00:09:49 +01:00
|
|
|
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);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
|
2017-03-25 04:18:58 +01:00
|
|
|
index 549e3434b..bc0652874 100644
|
2016-03-01 00:09:49 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntitySquid.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
|
2016-11-17 03:23:38 +01:00
|
|
|
@@ -141,7 +141,7 @@ public class EntitySquid extends EntityWaterAnimal {
|
2016-03-01 00:09:49 +01:00
|
|
|
}
|
|
|
|
|
2016-11-17 03:23:38 +01:00
|
|
|
public boolean cM() {
|
|
|
|
- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cM();
|
|
|
|
+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cM(); // Paper - Configurable squid spawn height range
|
2016-03-01 00:09:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void b(float f, float f1, float f2) {
|
|
|
|
--
|
2017-03-25 04:18:58 +01:00
|
|
|
2.12.0.windows.1
|
2016-03-01 00:09:49 +01:00
|
|
|
|