2017-06-19 01:36:55 +00:00
|
|
|
From 6e18fbc081ded96ffa9b24ea6dfbcb1a49bfe924 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
|
2017-06-19 01:36:55 +00:00
|
|
|
index b37b5901..adc81072 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
|
2017-03-25 03:18:58 +00:00
|
|
|
@@ -263,4 +263,9 @@ public class PaperWorldConfig {
|
2016-03-22 17:07:16 +00:00
|
|
|
}
|
|
|
|
log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public double skeleHorseSpawnChance;
|
|
|
|
+ private void skeleHorseSpawnChance() {
|
2016-11-17 02:23:38 +00:00
|
|
|
+ skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D); // -1.0D represents a "vanilla" state
|
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
|
2017-06-19 01:36:55 +00:00
|
|
|
index a00837f9..8e4697a0 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
|
2017-06-11 17:03:07 +00:00
|
|
|
@@ -493,7 +493,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
2016-03-22 17:07:16 +00:00
|
|
|
if (this.isRainingAt(blockposition)) {
|
|
|
|
DifficultyDamageScaler difficultydamagescaler = this.D(blockposition);
|
|
|
|
|
2016-11-17 02:23:38 +00:00
|
|
|
- if (this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.01D) {
|
|
|
|
+ if (this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance) {
|
|
|
|
EntityHorseSkeleton entityhorseskeleton = new EntityHorseSkeleton(this);
|
2016-03-22 17:07:16 +00:00
|
|
|
|
2016-11-17 02:23:38 +00:00
|
|
|
entityhorseskeleton.p(true);
|
2016-03-22 17:07:16 +00:00
|
|
|
--
|
2017-06-19 01:36:55 +00:00
|
|
|
2.13.1.windows.2
|
2016-03-22 17:07:16 +00:00
|
|
|
|