mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-16 07:35:35 +01:00
SPIGOT-5255: Raid / patrol spawn reasons
This commit is contained in:
parent
763e560135
commit
aa492e552e
11
nms-patches/MobSpawnerPatrol.patch
Normal file
11
nms-patches/MobSpawnerPatrol.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/net/minecraft/server/MobSpawnerPatrol.java
|
||||||
|
+++ b/net/minecraft/server/MobSpawnerPatrol.java
|
||||||
|
@@ -96,7 +96,7 @@
|
||||||
|
|
||||||
|
entitymonsterpatrolling.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
|
||||||
|
entitymonsterpatrolling.prepare(world, world.getDamageScaler(blockposition), EnumMobSpawn.PATROL, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||||
|
- world.addEntity(entitymonsterpatrolling);
|
||||||
|
+ world.addEntity(entitymonsterpatrolling, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PATROL); // CraftBukkit
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
@ -140,6 +140,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void a(int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) {
|
public void a(int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) {
|
||||||
|
@@ -513,7 +536,7 @@
|
||||||
|
entityraider.prepare(this.k, this.k.getDamageScaler(blockposition), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||||
|
entityraider.a(i, false);
|
||||||
|
entityraider.onGround = true;
|
||||||
|
- this.k.addEntity(entityraider);
|
||||||
|
+ this.k.addEntity(entityraider, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.RAID); // CraftBukkit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -759,6 +782,12 @@
|
@@ -759,6 +782,12 @@
|
||||||
this.h.add(entity.getUniqueID());
|
this.h.add(entity.getUniqueID());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user