Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/Spigot-Server-Patches/0006-Configurable-squid-spawn-ranges.patch

42 Zeilen
1.9 KiB
Diff

From 2475b727707230bcf5e97c384ce2e5c512392afa Mon Sep 17 00:00:00 2001
2015-01-29 22:25:50 +01:00
From: Zach Brown <zach.brown@destroystokyo.com>
2014-11-28 02:17:45 +01:00
Date: Fri, 28 Nov 2014 00:41:04 -0600
2014-06-22 22:32:38 +02: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
2014-11-28 02:17:45 +01:00
index ee93dfe..0868017 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
2014-11-28 02:17:45 +01:00
@@ -145,7 +145,8 @@ public class EntitySquid extends EntityWaterAnimal {
2014-06-22 22:32:38 +02:00
}
2014-11-28 02:17:45 +01:00
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();
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) {
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
2014-08-06 01:45:22 +02:00
index b9d1afe..f6b0349 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
2014-08-06 01:45:22 +02:00
@@ -81,4 +81,13 @@ public class PaperSpigotWorldConfig
allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true );
log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
2014-06-22 22:32:38 +02:00
}
+
2014-08-06 01:45:22 +02:00
+ public double squidMinSpawnHeight;
+ public double squidMaxSpawnHeight;
2014-06-22 22:32:38 +02:00
+ private void squidSpawnHeight()
+ {
+ squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D );
+ squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
2014-08-06 01:45:22 +02:00
+ log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight);
2014-06-22 22:32:38 +02:00
+ }
}
2014-06-22 22:32:38 +02:00
--
1.9.5.msysgit.0
2014-06-22 22:32:38 +02:00