Add list of entities to EntityTransformEvent & move die calls
By: nathat890 <nathat890@outlook.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
public class EntityMushroomCow extends EntityCow {
|
||||
|
||||
public EntityMushroomCow(World world) {
|
||||
@@ -23,6 +29,14 @@
|
||||
@@ -23,9 +29,17 @@
|
||||
|
||||
return true;
|
||||
} else if (itemstack.getItem() == Items.SHEARS && this.getAge() >= 0) {
|
||||
@@ -27,8 +27,12 @@
|
||||
+ // CraftBukkit end
|
||||
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,7 +49,12 @@
|
||||
- this.die();
|
||||
+ // this.die(); // CraftBukkit - moved down
|
||||
EntityCow entitycow = new EntityCow(this.world);
|
||||
|
||||
entitycow.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
|
||||
@@ -35,7 +49,14 @@
|
||||
entitycow.setCustomName(this.getCustomName());
|
||||
}
|
||||
|
||||
@@ -38,6 +42,8 @@
|
||||
+ return false;
|
||||
+ }
|
||||
+ this.world.addEntity(entitycow, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED);
|
||||
+
|
||||
+ this.die(); // CraftBukkit - from above
|
||||
+ // CraftBukkit end
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user