Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 21:10:10 +01:00
Re-added EntityCombust event to skeletons. Fixes BUKKIT-1188
Dieser Commit ist enthalten in:
Ursprung
92f771a022
Commit
42822ddca4
@ -1,12 +1,5 @@
|
||||
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 {
|
||||
|
||||
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);
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren