2018-07-19 06:42:43 +02:00
|
|
|
From b03e35486eb18d15d0e8e46d3ac4a6e198931453 Mon Sep 17 00:00:00 2001
|
2016-03-22 18:07:16 +01: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
|
2018-07-15 03:53:17 +02:00
|
|
|
index b9dc0be2c..9f586774d 100644
|
2016-03-22 18:07:16 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2018-07-15 03:53:17 +02:00
|
|
|
@@ -211,4 +211,9 @@ public class PaperWorldConfig {
|
2016-03-22 18:07:16 +01:00
|
|
|
}
|
|
|
|
log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public double skeleHorseSpawnChance;
|
|
|
|
+ private void skeleHorseSpawnChance() {
|
2016-11-17 03:23:38 +01:00
|
|
|
+ skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D); // -1.0D represents a "vanilla" state
|
2016-03-22 18:07:16 +01:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
2018-07-15 03:53:17 +02:00
|
|
|
index 9bd11a5fd..88868b4c4 100644
|
2016-03-22 18:07:16 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
2018-07-15 03:53:17 +02:00
|
|
|
@@ -498,7 +498,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
2016-03-22 18:07:16 +01:00
|
|
|
if (this.isRainingAt(blockposition)) {
|
2018-07-15 03:53:17 +02:00
|
|
|
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
2016-03-22 18:07:16 +01:00
|
|
|
|
2016-11-17 03:23:38 +01: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 18:07:16 +01:00
|
|
|
|
2018-07-15 03:53:17 +02:00
|
|
|
entityhorseskeleton.s(true);
|
2016-03-22 18:07:16 +01:00
|
|
|
--
|
2018-07-04 09:55:24 +02:00
|
|
|
2.18.0
|
2016-03-22 18:07:16 +01:00
|
|
|
|