mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Re-added EntityCombust event to skeletons. Fixes BUKKIT-1188
This commit is contained in:
parent
92f771a022
commit
42822ddca4
@ -1,12 +1,5 @@
|
|||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
// CraftBukkit start
|
|
||||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
||||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
|
||||||
import org.bukkit.event.entity.EntityCombustEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
|
||||||
// CraftBukkit end
|
|
||||||
|
|
||||||
public class EntitySkeleton extends EntityMonster {
|
public class EntitySkeleton extends EntityMonster {
|
||||||
|
|
||||||
private static final ItemStack a = new ItemStack(Item.BOW, 1);
|
private static final ItemStack a = new ItemStack(Item.BOW, 1);
|
||||||
@ -55,7 +48,14 @@ public class EntitySkeleton extends EntityMonster {
|
|||||||
float f = this.b(1.0F);
|
float f = this.b(1.0F);
|
||||||
|
|
||||||
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) {
|
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) {
|
||||||
this.setOnFire(8);
|
// CraftBukkit start
|
||||||
|
org.bukkit.event.entity.EntityCombustEvent event = new org.bukkit.event.entity.EntityCombustEvent(this.getBukkitEntity(), 8);
|
||||||
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
if (!event.isCancelled()) {
|
||||||
|
this.setOnFire(event.getDuration());
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user