Implementation of reworked EntityCombustEvents

Also includes some extra comments, and a refactoring of the
PaintingBreakByEntity event that is raised when lighting strikes a painting.
This commit is contained in:
Andrew Ardill
2011-11-29 18:10:05 +11:00
parent 0c88f05c0d
commit 3da00ee41a
5 changed files with 46 additions and 34 deletions

View File

@@ -25,11 +25,11 @@ public class EntityZombie extends EntityMonster {
if (f > 0.5F && this.world.isChunkLoaded(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
// CraftBukkit start
EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity());
EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity(), 8);
this.world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
this.j(8);
this.j(event.getDuration());
}
// CraftBukkit end
}