2016-10-16 22:35:34 +02:00
|
|
|
From 6f186d0f6d800dbe7e7626e8794b6e8880ac38a9 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
|
2016-08-28 01:41:58 +02:00
|
|
|
index b701e5e..d29f2a4 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
|
2016-08-28 01:41:58 +02:00
|
|
|
@@ -278,4 +278,12 @@ 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-03-22 20:55:42 +01:00
|
|
|
+ skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", -1.0D); // -1.0D represents a "vanilla" state
|
2016-05-30 18:50:57 +02:00
|
|
|
+ if (skeleHorseSpawnChance < 0) {
|
|
|
|
+ skeleHorseSpawnChance = 0.05D; // Vanilla
|
|
|
|
+ }
|
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
|
2016-10-16 22:35:34 +02:00
|
|
|
index c2c0b5e..170a0ce 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
|
2016-10-16 22:35:34 +02:00
|
|
|
@@ -432,7 +432,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
2016-03-22 18:07:16 +01:00
|
|
|
if (this.isRainingAt(blockposition)) {
|
|
|
|
DifficultyDamageScaler difficultydamagescaler = this.D(blockposition);
|
|
|
|
|
|
|
|
- if (this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.05D) {
|
2016-05-30 18:50:57 +02:00
|
|
|
+ if (this.random.nextDouble() < difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance) { // Paper - Configurable skeleton horse spawn chance
|
2016-03-22 18:07:16 +01:00
|
|
|
EntityHorse entityhorse = new EntityHorse(this);
|
|
|
|
|
|
|
|
entityhorse.setType(EnumHorseType.SKELETON);
|
|
|
|
--
|
2016-10-16 22:35:34 +02:00
|
|
|
2.10.1
|
2016-03-22 18:07:16 +01:00
|
|
|
|