summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityMushroomCow.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityMushroomCow.patch')
-rw-r--r--nms-patches/EntityMushroomCow.patch6
1 files changed, 4 insertions, 2 deletions
diff --git a/nms-patches/EntityMushroomCow.patch b/nms-patches/EntityMushroomCow.patch
index e39e2781..3c07a016 100644
--- a/nms-patches/EntityMushroomCow.patch
+++ b/nms-patches/EntityMushroomCow.patch
@@ -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)));