|
89 | 89 |
|
90 | 90 | public void tickCustomSpawners(boolean spawnEnemies, boolean spawnFriendlies) { |
91 | 91 | for (CustomSpawner customSpawner : this.customSpawners) { |
92 | | -@@ -934,9 +_,18 @@ |
| 92 | +@@ -934,9 +_,17 @@ |
93 | 93 | && this.random.nextDouble() < currentDifficultyAt.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01) // Paper - Configurable spawn chances for skeleton horses |
94 | 94 | && !this.getBlockState(blockPos.below()).is(Blocks.LIGHTNING_ROD); |
95 | 95 | if (flag) { |
| 96 | +- SkeletonHorse skeletonHorse = EntityType.SKELETON_HORSE.create(this, EntitySpawnReason.EVENT); |
96 | 97 | + // Purpur start - Special mobs naturally spawn |
97 | | -+ net.minecraft.world.entity.animal.horse.AbstractHorse entityhorseskeleton; |
| 98 | ++ net.minecraft.world.entity.animal.horse.AbstractHorse skeletonHorse; |
98 | 99 | + 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); |
100 | 101 | + } 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); |
103 | 104 | + } |
104 | 105 | + // Purpur end - Special mobs naturally spawn |
105 | | - SkeletonHorse skeletonHorse = EntityType.SKELETON_HORSE.create(this, EntitySpawnReason.EVENT); |
106 | 106 | if (skeletonHorse != null) { |
107 | 107 | - skeletonHorse.setTrap(true); |
108 | 108 | + //skeletonHorse.setTrap(true); // Purpur - Special mobs naturally spawn - moved up |
|
0 commit comments