mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
90ac03522a
This reverts commit d6e3dff7d8
.
39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
--- ../work/decompile-8eb82bde//net/minecraft/server/MobSpawnerAbstract.java 2014-11-28 17:43:43.261707431 +0000
|
|
+++ src/main/java/net/minecraft/server/MobSpawnerAbstract.java 2014-11-28 17:38:17.000000000 +0000
|
|
@@ -4,6 +4,8 @@
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
|
|
+import org.bukkit.event.entity.CreatureSpawnEvent; // CraftBukkit
|
|
+
|
|
public abstract class MobSpawnerAbstract {
|
|
|
|
public int spawnDelay = 20;
|
|
@@ -129,7 +131,7 @@
|
|
|
|
entity.f(nbttagcompound);
|
|
if (entity.world != null && flag) {
|
|
- entity.world.addEntity(entity);
|
|
+ entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
|
}
|
|
|
|
NBTTagCompound nbttagcompound1;
|
|
@@ -154,7 +156,7 @@
|
|
entity2.f(nbttagcompound2);
|
|
entity2.setPositionRotation(entity1.locX, entity1.locY, entity1.locZ, entity1.yaw, entity1.pitch);
|
|
if (entity.world != null && flag) {
|
|
- entity.world.addEntity(entity2);
|
|
+ entity.world.addEntity(entity2, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
|
}
|
|
|
|
entity1.mount(entity2);
|
|
@@ -164,7 +166,7 @@
|
|
}
|
|
} else if (entity instanceof EntityLiving && entity.world != null && flag) {
|
|
((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
|
|
- entity.world.addEntity(entity);
|
|
+ entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
|
}
|
|
|
|
return entity;
|