2020-01-22 02:02:07 +00:00
|
|
|
From 9290f564d1b0d7b30aa8449be4bce60228f0d23f Mon Sep 17 00:00:00 2001
|
2016-03-22 17:07:16 +00:00
|
|
|
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
|
2020-01-18 17:28:32 +00:00
|
|
|
index 7de7b74ff..6ef0e1399 100644
|
2016-03-22 17:07:16 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-01-18 17:28:32 +00:00
|
|
|
@@ -228,4 +228,12 @@ public class PaperWorldConfig {
|
2016-03-22 17:07:16 +00:00
|
|
|
log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate);
|
2018-09-23 02:48:30 +00:00
|
|
|
log("Creative Arrow Despawn Rate: " + creativeArrowDespawnRate);
|
2016-03-22 17:07:16 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public double skeleHorseSpawnChance;
|
|
|
|
+ private void skeleHorseSpawnChance() {
|
2018-08-26 18:11:49 +00:00
|
|
|
+ skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D);
|
|
|
|
+ if (skeleHorseSpawnChance < 0) {
|
|
|
|
+ skeleHorseSpawnChance = 0.01D; // Vanilla value
|
|
|
|
+ }
|
2016-03-22 17:07:16 +00:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
2020-01-22 02:02:07 +00:00
|
|
|
index 173e3857e..0146573a3 100644
|
2016-03-22 17:07:16 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
2019-12-23 02:37:47 +00:00
|
|
|
@@ -450,7 +450,7 @@ public class WorldServer extends World {
|
2019-04-26 01:24:00 +00:00
|
|
|
blockposition = this.a(this.a(j, 0, k, 15));
|
|
|
|
if (this.isRainingAt(blockposition)) {
|
|
|
|
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
2019-06-25 01:47:58 +00:00
|
|
|
- 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
|
2016-03-22 17:07:16 +00:00
|
|
|
|
2019-04-26 01:24:00 +00:00
|
|
|
if (flag1) {
|
|
|
|
EntityHorseSkeleton entityhorseskeleton = (EntityHorseSkeleton) EntityTypes.SKELETON_HORSE.a((World) this);
|
2016-03-22 17:07:16 +00:00
|
|
|
--
|
2020-01-18 17:28:32 +00:00
|
|
|
2.25.0.windows.1
|
2016-03-22 17:07:16 +00:00
|
|
|
|