mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Added SpawnReasons to CreatureSpawn events. Thanks winsock!
This commit is contained in:
1 parent
faab690dc7
commit
79337d3aab
7 files changed
+279
-9
No files matched your search
@@ -2,8 +2,7 @@ package net.minecraft.server;
|
||||
|
||||
// CraftBukkit start
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.event.entity.EntityCombustEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
import org.bukkit.event.entity.PigZapEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -83,7 +82,8 @@ public class EntityPig extends EntityAnimal {
|
||||
// CraftBukkit end
|
||||
|
||||
entitypigzombie.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
|
||||
this.world.addEntity(entitypigzombie);
|
||||
// CraftBukkit - added a reason for spawning this creature
|
||||
this.world.addEntity(entitypigzombie, SpawnReason.LIGHTNING);
|
||||
this.die();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user