Add list of entities to EntityTransformEvent & move die calls
By: nathat890 <nathat890@outlook.com>
This commit is contained in:
@@ -47,7 +47,15 @@
|
||||
this.world.broadcastEntityEffect(this, (byte) 16);
|
||||
}
|
||||
|
||||
@@ -123,7 +135,12 @@
|
||||
@@ -116,14 +128,20 @@
|
||||
entityvillager.setAgeRaw(-24000);
|
||||
}
|
||||
|
||||
- this.world.kill(this);
|
||||
+ // this.world.kill(this); // CraftBukkit - moved down
|
||||
entityvillager.setNoAI(this.isNoAI());
|
||||
if (this.hasCustomName()) {
|
||||
entityvillager.setCustomName(this.getCustomName());
|
||||
entityvillager.setCustomNameVisible(this.getCustomNameVisible());
|
||||
}
|
||||
|
||||
@@ -56,12 +64,13 @@
|
||||
+ if (CraftEventFactory.callEntityTransformEvent(this, entityvillager, EntityTransformEvent.TransformReason.CURED).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+ this.world.kill(this); // CraftBukkit - from above
|
||||
+ this.world.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CURED); // CraftBukkit - add SpawnReason
|
||||
+ // CraftBukkit end
|
||||
if (this.bD != null) {
|
||||
EntityHuman entityhuman = this.world.b(this.bD);
|
||||
|
||||
@@ -132,7 +149,7 @@
|
||||
@@ -132,7 +150,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user