Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
e4d10a6d67
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: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
40 Zeilen
2.1 KiB
Diff
40 Zeilen
2.1 KiB
Diff
From b4f0c7aa46a509236ce5bf3606b5f13280c2be6b 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 7de7b74ff6..6ef0e1399e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -228,4 +228,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 a34df8ce5d..96ed2da1f8 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -449,7 +449,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.25.1
|
|
|