mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 8812fed9 Merge pull request #2240 from Spottedleaf/anti-xray bd46b639 Merge branch 'ver/1.14' of github.com:PaperMC/Paper into anti-xray e679a7c1 Config migrations 0a667728 Resolve crash issue by shoving chunk loads onto the next tick 3a2d7f2d Merge branch 'ver/1.14' of github.com:PaperMC/Paper into anti-xray 5ffa0dae Do not force load chunks for plugin constructed packets e993aa6f Merge branch 'ver/1.14' of github.com:PaperMC/Paper into anti-xray 9a4a185f Keep neighbour chunks loaded while obfuscating f1f8060a Fix build? 76eb2a5e Use getChunkIfLoadedImmediately not getChunkIfCachedImmediately ad757f96 Delete 0335-Anti-Xray.patch 46a6f1b2 Re-Add Anti-Xray
42 lines
2.4 KiB
Diff
42 lines
2.4 KiB
Diff
From 8a66ded4d1094109f614eea91d247b291019e5d9 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Sun, 7 Jul 2019 19:52:16 -0500
|
|
Subject: [PATCH] Add chance for zombie horse natural spawns
|
|
|
|
---
|
|
.../java/net/minecraft/server/WorldServer.java | 18 ++++++++++++------
|
|
1 file changed, 12 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
index 489fb57dc..b5c902e1d 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -398,12 +398,18 @@ public class WorldServer extends World {
|
|
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);
|
|
-
|
|
- entityhorseskeleton.r(true);
|
|
- entityhorseskeleton.setAgeRaw(0);
|
|
- entityhorseskeleton.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
|
|
- this.addEntity(entityhorseskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
|
|
+ // Purpur start
|
|
+ EntityHorseAbstract horse;
|
|
+ if (random.nextFloat() < 0.75) {
|
|
+ horse = EntityTypes.SKELETON_HORSE.a(this);
|
|
+ ((EntityHorseSkeleton) horse).r(true);
|
|
+ } else {
|
|
+ horse = EntityTypes.ZOMBIE_HORSE.a(this);
|
|
+ }
|
|
+ horse.setAgeRaw(0);
|
|
+ horse.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
|
|
+ this.addEntity(horse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
|
|
+ // Purpur end
|
|
}
|
|
|
|
this.strikeLightning(new EntityLightning(this, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, flag1), org.bukkit.event.weather.LightningStrikeEvent.Cause.WEATHER); // CraftBukkit
|
|
--
|
|
2.20.1
|
|
|