Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
0708fa363b
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:eb2e6578
SPIGOT-5116: Fix concurrent modification exception inside ChunkMapDistance989f9b3d
SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate eventsf554183c
SPIGOT-5171: Don't fire PlayerTeleportEvent if not actually moving2349feb8
SPIGOT-5163: Cancelling PlayerBucketFillEvent visually removes the targeted block Spigot Changes: 9a643a6a Remove DataWatcher Locking
40 Zeilen
2.1 KiB
Diff
40 Zeilen
2.1 KiB
Diff
From 4d925697fd5b650cc2bc7b653993e85bb6225131 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
|
|
|
|
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 b3d8fe9c6..7287bf7d9 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -339,4 +339,9 @@ public class PaperWorldConfig {
|
|
expMergeMaxValue = getInt("experience-merge-max-value", -1);
|
|
log("Experience Merge Max Value: " + expMergeMaxValue);
|
|
}
|
|
+
|
|
+ public double squidMaxSpawnHeight;
|
|
+ private void squidMaxSpawnHeight() {
|
|
+ squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
|
|
index 338c203b3..aafb7df0c 100644
|
|
--- a/src/main/java/net/minecraft/server/EntitySquid.java
|
|
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
|
|
@@ -171,7 +171,8 @@ public class EntitySquid extends EntityWaterAnimal {
|
|
}
|
|
|
|
public static boolean b(EntityTypes<EntitySquid> entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) {
|
|
- return blockposition.getY() > generatoraccess.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && blockposition.getY() < generatoraccess.getSeaLevel(); // Spigot
|
|
+ final double maxHeight = generatoraccess.getMinecraftWorld().paperConfig.squidMaxSpawnHeight > 0 ? generatoraccess.getMinecraftWorld().paperConfig.squidMaxSpawnHeight : generatoraccess.getSeaLevel(); // Paper
|
|
+ return blockposition.getY() > generatoraccess.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && blockposition.getY() < maxHeight; // Spigot // Paper
|
|
}
|
|
|
|
public void a(float f, float f1, float f2) {
|
|
--
|
|
2.22.0
|
|
|