2016-05-12 02:07:46 +00:00
|
|
|
From ba437ee826f25bccd4ff0b36e33a206e4e625c66 Mon Sep 17 00:00:00 2001
|
2016-02-29 23:09:49 +00: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
|
2016-03-18 21:41:26 +00:00
|
|
|
index 2d50237..fe9502c 100644
|
2016-02-29 23:09:49 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-03-18 21:41:26 +00:00
|
|
|
@@ -66,4 +66,12 @@ public class PaperWorldConfig {
|
2016-02-29 23:09:49 +00: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
|
2016-05-12 02:07:46 +00:00
|
|
|
index c771b6b..62469f8 100644
|
2016-02-29 23:09:49 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntitySquid.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
|
2016-05-12 02:07:46 +00:00
|
|
|
@@ -141,7 +141,8 @@ public class EntitySquid extends EntityWaterAnimal {
|
2016-02-29 23:09:49 +00:00
|
|
|
}
|
|
|
|
|
2016-05-12 02:07:46 +00:00
|
|
|
public boolean cG() {
|
|
|
|
- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cG();
|
2016-02-29 23:09:49 +00:00
|
|
|
+ // Paper - Configurable squid spawn height range
|
2016-05-12 02:07:46 +00:00
|
|
|
+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cG();
|
2016-02-29 23:09:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void b(float f, float f1, float f2) {
|
|
|
|
--
|
2016-05-12 02:07:46 +00:00
|
|
|
2.8.2
|
2016-02-29 23:09:49 +00:00
|
|
|
|