mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +01:00
90ac03522a
This reverts commit d6e3dff7d8
.
27 lines
1.3 KiB
Diff
27 lines
1.3 KiB
Diff
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityMonster.java 2014-11-28 17:43:43.137707434 +0000
|
|
+++ src/main/java/net/minecraft/server/EntityMonster.java 2014-11-28 17:38:21.000000000 +0000
|
|
@@ -1,5 +1,7 @@
|
|
package net.minecraft.server;
|
|
|
|
+import org.bukkit.event.entity.EntityCombustByEntityEvent; // CraftBukkit
|
|
+
|
|
public abstract class EntityMonster extends EntityCreature implements IMonster {
|
|
|
|
protected final PathfinderGoal a = new PathfinderGoalAvoidTarget(this, new EntitySelectorExplodingCreeper(this), 4.0F, 1.0D, 2.0D);
|
|
@@ -81,7 +83,14 @@
|
|
int j = EnchantmentManager.getFireAspectEnchantmentLevel(this);
|
|
|
|
if (j > 0) {
|
|
- entity.setOnFire(j * 4);
|
|
+ // CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item
|
|
+ EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), j * 4);
|
|
+ org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
|
|
+
|
|
+ if (!combustEvent.isCancelled()) {
|
|
+ entity.setOnFire(combustEvent.getDuration());
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
|
|
this.a((EntityLiving) this, entity);
|