Add some missing CreatureSpawnEvent.SpawnReason calls
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -28,15 +28,17 @@
|
||||
this.world.addParticle(Particles.u, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, 0.0D, 0.0D, 0.0D);
|
||||
if (!this.world.isClientSide) {
|
||||
this.die();
|
||||
@@ -35,6 +49,11 @@
|
||||
@@ -35,7 +49,12 @@
|
||||
entitycow.setCustomName(this.getCustomName());
|
||||
}
|
||||
|
||||
- this.world.addEntity(entitycow);
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callEntityTransformEvent(this, entitycow, EntityTransformEvent.TransformReason.SHEARED).isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ this.world.addEntity(entitycow, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED);
|
||||
+ // CraftBukkit end
|
||||
this.world.addEntity(entitycow);
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
this.world.addEntity(new EntityItem(this.world, this.locX, this.locY + (double) this.length, this.locZ, new ItemStack(Blocks.RED_MUSHROOM)));
|
||||
|
||||
Reference in New Issue
Block a user