mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
39 lines
No EOL
2 KiB
Diff
39 lines
No EOL
2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
|
Date: Fri, 28 Nov 2014 00:41:04 -0600
|
|
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
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- 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 {
|
|
}
|
|
|
|
public boolean bQ() {
|
|
- return this.locY > 45.0D && this.locY < 63.0D && super.bQ();
|
|
+ // PaperSpigot - Configurable squid spawn range
|
|
+ return this.locY > this.world.paperSpigotConfig.squidMinSpawnHeight && this.locY < this.world.paperSpigotConfig.squidMaxSpawnHeight && super.bQ();
|
|
}
|
|
|
|
public void b(float f, float f1, float f2) {
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
|
|
allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true );
|
|
log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
|
|
}
|
|
+
|
|
+ public double squidMinSpawnHeight;
|
|
+ public double squidMaxSpawnHeight;
|
|
+ private void squidSpawnHeight()
|
|
+ {
|
|
+ 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);
|
|
+ }
|
|
}
|
|
--
|