Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit b34d675

Browse files
committed
fix zombie_horse.spawn-chance option not working
1 parent 3f8e613 commit b34d675

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

purpur-server/minecraft-patches/sources/net/minecraft/server/level/ServerLevel.java.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,20 @@
8989

9090
public void tickCustomSpawners(boolean spawnEnemies, boolean spawnFriendlies) {
9191
for (CustomSpawner customSpawner : this.customSpawners) {
92-
@@ -934,9 +_,18 @@
92+
@@ -934,9 +_,17 @@
9393
&& this.random.nextDouble() < currentDifficultyAt.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01) // Paper - Configurable spawn chances for skeleton horses
9494
&& !this.getBlockState(blockPos.below()).is(Blocks.LIGHTNING_ROD);
9595
if (flag) {
96+
- SkeletonHorse skeletonHorse = EntityType.SKELETON_HORSE.create(this, EntitySpawnReason.EVENT);
9697
+ // Purpur start - Special mobs naturally spawn
97-
+ net.minecraft.world.entity.animal.horse.AbstractHorse entityhorseskeleton;
98+
+ net.minecraft.world.entity.animal.horse.AbstractHorse skeletonHorse;
9899
+ if (purpurConfig.zombieHorseSpawnChance > 0D && random.nextDouble() <= purpurConfig.zombieHorseSpawnChance) {
99-
+ entityhorseskeleton = EntityType.ZOMBIE_HORSE.create(this, EntitySpawnReason.EVENT);
100+
+ skeletonHorse = EntityType.ZOMBIE_HORSE.create(this, EntitySpawnReason.EVENT);
100101
+ } else {
101-
+ entityhorseskeleton = EntityType.SKELETON_HORSE.create(this, EntitySpawnReason.EVENT);
102-
+ if (entityhorseskeleton != null) ((SkeletonHorse) entityhorseskeleton).setTrap(true);
102+
+ skeletonHorse = EntityType.SKELETON_HORSE.create(this, EntitySpawnReason.EVENT);
103+
+ if (skeletonHorse != null) ((SkeletonHorse) skeletonHorse).setTrap(true);
103104
+ }
104105
+ // Purpur end - Special mobs naturally spawn
105-
SkeletonHorse skeletonHorse = EntityType.SKELETON_HORSE.create(this, EntitySpawnReason.EVENT);
106106
if (skeletonHorse != null) {
107107
- skeletonHorse.setTrap(true);
108108
+ //skeletonHorse.setTrap(true); // Purpur - Special mobs naturally spawn - moved up

0 commit comments

Comments
 (0)