mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 01:17:44 +01:00
Fix warden spawn reason from DEFAULT to NATURAL (#8744)
This commit is contained in:
parent
52849f6da6
commit
8b1ac39e89
@ -22,7 +22,7 @@ index 2eddeb8d5239bbfeefbf4d3bd363f1ad083299b6..a7c89cdf20cb63792c76de81c1ff9f2c
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5de07950d549716e917ec3fd2f364c994007333e..440ea09a6645e0c094a9378b6fbacf335ab04d1b 100644
|
||||
index 0d253f0dd5332d2e68842c4b6c6a3a0909ace440..39bfb4660423cd8bdf67a0aca66fe5b0d353aa84 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1431,6 +1431,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -34,7 +34,7 @@ index 5de07950d549716e917ec3fd2f364c994007333e..440ea09a6645e0c094a9378b6fbacf33
|
||||
// Paper start
|
||||
if (DEBUG_ENTITIES) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 2e4e90223160361e21e651c9dbcffdef7b235af7..11e52541ea928e77c2913ff4029bde8c612ee229 100644
|
||||
index 72dc59f2081e517587d66d03d9b5910caf0e1c17..e06748a8550ffff34ea4e070e143348397d4d438 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -225,6 +225,11 @@ public abstract class PlayerList {
|
||||
@ -59,7 +59,7 @@ index 2e4e90223160361e21e651c9dbcffdef7b235af7..11e52541ea928e77c2913ff4029bde8c
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 72c33eaa232503c373bf8cf9a1c1c7603923e80a..af707404bfbba0ded894b6bd29c87c07e62b7854 100644
|
||||
index d4a3002daeac944430b92e1924c7febc384ba871..23194db56de5e9b488048386720fdf855729bbd0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -234,6 +234,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -119,8 +119,21 @@ index a9be524edb03c51300bc45d424fcf87c7491a8c0..a08c2dee792da1a54005f0a65a9eefab
|
||||
flag = true; // Paper
|
||||
// CraftBukkit start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
|
||||
index faad948f089575e4988d989790cc1dd13f8a79cd..ee11a52e82091911aa3a196bcc1f7ab829626cef 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
|
||||
@@ -186,7 +186,7 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
|
||||
}
|
||||
|
||||
private boolean trySummonWarden(ServerLevel world) {
|
||||
- return this.warningLevel < 4 ? false : SpawnUtil.trySpawnMob(EntityType.WARDEN, MobSpawnType.TRIGGERED, world, this.getBlockPos(), 20, 5, 6, SpawnUtil.Strategy.ON_TOP_OF_COLLIDER).isPresent();
|
||||
+ return this.warningLevel < 4 ? false : SpawnUtil.trySpawnMob(EntityType.WARDEN, MobSpawnType.TRIGGERED, world, this.getBlockPos(), 20, 5, 6, SpawnUtil.Strategy.ON_TOP_OF_COLLIDER, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL, null).isPresent(); // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 5e9642662716a0e60a700e6359539339f1cf5230..96f78f74433b4b54cf4ebec624649eca4f157602 100644
|
||||
index 990525598365e8fd88c9c4219a2f125c7c594a95..d84ec9e1dc7c536e46fbb924c27f5734ed8e1303 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1323,5 +1323,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
Loading…
Reference in New Issue
Block a user