mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
SPIGOT-7200: CreatureSpawnEvent is called with incorrect SpawnReason when using spawn eggs
By: md_5 <git@md-5.net>
This commit is contained in:
parent
644b6c302a
commit
0cb9e6122e
1 changed files with 9 additions and 0 deletions
|
@ -45,6 +45,15 @@
|
||||||
|
|
||||||
if (itemstack != null) {
|
if (itemstack != null) {
|
||||||
nbttagcompound = itemstack.getTag();
|
nbttagcompound = itemstack.getTag();
|
||||||
|
@@ -342,7 +350,7 @@
|
||||||
|
nbttagcompound = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
- return this.spawn(worldserver, nbttagcompound, consumer, blockposition, enummobspawn, flag, flag1);
|
||||||
|
+ return this.spawn(worldserver, nbttagcompound, consumer, blockposition, enummobspawn, flag, flag1, spawnReason); // CraftBukkit
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T extends Entity> Consumer<T> createDefaultStackConfig(WorldServer worldserver, ItemStack itemstack, @Nullable EntityHuman entityhuman) {
|
||||||
@@ -363,21 +371,37 @@
|
@@ -363,21 +371,37 @@
|
||||||
NBTTagCompound nbttagcompound = itemstack.getTag();
|
NBTTagCompound nbttagcompound = itemstack.getTag();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue