2015-03-07 19:16:09 -06:00
|
|
|
From 6b5d69ae84764c2a11f03c5fd257486181017987 Mon Sep 17 00:00:00 2001
|
2015-01-29 15:25:50 -06:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
2015-03-07 19:16:09 -06:00
|
|
|
Date: Sat, 7 Mar 2015 20:20:29 -0600
|
2014-06-22 15:32:38 -05:00
|
|
|
Subject: [PATCH] Configurable squid spawn ranges
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
|
2015-03-07 19:16:09 -06:00
|
|
|
index 511bec7..31996b4 100644
|
2014-06-22 15:32:38 -05:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntitySquid.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
|
2015-03-07 19:16:09 -06:00
|
|
|
@@ -141,7 +141,8 @@ public class EntitySquid extends EntityWaterAnimal {
|
2014-06-22 15:32:38 -05:00
|
|
|
}
|
|
|
|
|
2015-03-07 19:16:09 -06:00
|
|
|
public boolean bR() {
|
|
|
|
- return this.locY > 45.0D && this.locY < (double) this.world.F() && super.bR();
|
2014-11-27 17:17:45 -08:00
|
|
|
+ // PaperSpigot - Configurable squid spawn range
|
2015-03-07 19:16:09 -06:00
|
|
|
+ return this.locY > this.world.paperSpigotConfig.squidMinSpawnHeight && this.locY < (double) this.world.paperSpigotConfig.squidMaxSpawnHeight && super.bR();
|
2014-06-22 15:32:38 -05:00
|
|
|
}
|
2014-11-27 17:17:45 -08:00
|
|
|
|
|
|
|
public void b(float f, float f1, float f2) {
|
2014-07-02 20:47:25 -05:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-03-07 19:16:09 -06:00
|
|
|
index 0b47234..f3bbac8 100644
|
2014-07-02 20:47:25 -05:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-05 18:45:22 -05:00
|
|
|
@@ -81,4 +81,13 @@ public class PaperSpigotWorldConfig
|
2015-03-07 19:16:09 -06:00
|
|
|
allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", false );
|
2014-07-02 20:47:25 -05:00
|
|
|
log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
|
2014-06-22 15:32:38 -05:00
|
|
|
}
|
2014-07-02 20:47:25 -05:00
|
|
|
+
|
2014-08-05 18:45:22 -05:00
|
|
|
+ public double squidMinSpawnHeight;
|
|
|
|
+ public double squidMaxSpawnHeight;
|
2014-06-22 15:32:38 -05:00
|
|
|
+ private void squidSpawnHeight()
|
|
|
|
+ {
|
|
|
|
+ squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D );
|
|
|
|
+ squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
|
2015-03-07 19:16:09 -06:00
|
|
|
+ log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight );
|
2014-06-22 15:32:38 -05:00
|
|
|
+ }
|
2014-07-02 20:47:25 -05:00
|
|
|
}
|
2014-06-22 15:32:38 -05:00
|
|
|
--
|
2015-03-07 19:16:09 -06:00
|
|
|
1.9.1
|
2014-06-22 15:32:38 -05:00
|
|
|
|