Paper/patches/unapplied/0170-Make-max-squid-spawn-height-configurable.patch

37 lines
1.8 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 11 Jan 2018 16:47:28 -0600
Subject: [PATCH] Make max squid spawn height configurable
2021-11-23 14:03:50 +00:00
#NOTE: Spigot removed the min option, Vanilla now has the same spawn rule for all ambient water animals
2021-06-11 12:02:28 +00:00
I don't know why upstream made only the minimum height configurable but
whatever
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index e2894138d3efb32161087ad2a1093b8c15c56a65..5892823425055efb92bf635b035d62981942b966 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -383,4 +383,9 @@ public class PaperWorldConfig {
disableCreeperLingeringEffect = getBoolean("disable-creeper-lingering-effect", false);
log("Creeper lingering effect: " + disableCreeperLingeringEffect);
2021-06-11 12:02:28 +00:00
}
+
+ public double squidMaxSpawnHeight;
+ private void squidMaxSpawnHeight() {
+ squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D);
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
2021-11-23 14:03:50 +00:00
index 370513fbc39f178f903ce140ced1a97029dd39db..b195617c39c4b382a196a709c318904cd0598e0e 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
2021-11-23 14:03:50 +00:00
@@ -206,7 +206,7 @@ public class Squid extends WaterAnimal {
public void travel(Vec3 movementInput) {
this.move(MoverType.SELF, this.getDeltaMovement());
2021-06-11 12:02:28 +00:00
}
2021-11-23 14:03:50 +00:00
-
+// AAA
@Override
2021-11-23 14:03:50 +00:00
public void handleEntityEvent(byte status) {
if (status == 19) {