Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
f8fd607e04
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 Bukkit Changes: bbfd13dd Hyperlink 'Events' in raid event package documentation b2095bed SPIGOT-5413: Add TrustedPlayer API for foxes 1bf1f3f4 Block trace methods do not require hash sets abf0cfdc Javadoc improvements per checkstyle c4a2b425 Add TimeSkipEvent CraftBukkit Changes:817116de
SPIGOT-5413: Add TrustedPlayer API for foxes062680a8
SPIGOT-5467: Calm down bees that cannot exit hive75fac431
SPIGOT-5472: Spurious warning when using clone command on tile entities85106731
SPIGOT-5471: Allow empty title/author for books2d9db47f
Add TimeSkipEvent384225c2
Add thread name to TerminalConsoleWriterThread Spigot Changes: 05bb8bcf Postpone stopping the watchdog until the server is completely stopped 18e2b9be Add package-info.java for Spigot APIs
40 Zeilen
2.1 KiB
Diff
40 Zeilen
2.1 KiB
Diff
From c3f360656a2f726e381153cd7b86f77c9b6561ca Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Tue, 22 Mar 2016 12:04:28 -0500
|
|
Subject: [PATCH] Configurable spawn chances for skeleton horses
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 64146effd..cc81e1cae 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -226,4 +226,12 @@ public class PaperWorldConfig {
|
|
log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate);
|
|
log("Creative Arrow Despawn Rate: " + creativeArrowDespawnRate);
|
|
}
|
|
+
|
|
+ public double skeleHorseSpawnChance;
|
|
+ private void skeleHorseSpawnChance() {
|
|
+ skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D);
|
|
+ if (skeleHorseSpawnChance < 0) {
|
|
+ skeleHorseSpawnChance = 0.01D; // Vanilla value
|
|
+ }
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
index c40aebc41..5bb94fb5e 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -450,7 +450,7 @@ public class WorldServer extends World {
|
|
blockposition = this.a(this.a(j, 0, k, 15));
|
|
if (this.isRainingAt(blockposition)) {
|
|
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
|
- boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.01D;
|
|
+ boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper
|
|
|
|
if (flag1) {
|
|
EntityHorseSkeleton entityhorseskeleton = (EntityHorseSkeleton) EntityTypes.SKELETON_HORSE.a((World) this);
|
|
--
|
|
2.24.1
|
|
|