mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
Re-add BlockBurnEvent
This commit is contained in:
parent
914688e2a0
commit
35aac12235
@ -120,7 +120,13 @@ public class BlockFire extends Block {
|
|||||||
|
|
||||||
if (random.nextInt(l) < i1) {
|
if (random.nextInt(l) < i1) {
|
||||||
boolean flag = world.getTypeId(i, j, k) == Block.TNT.id;
|
boolean flag = world.getTypeId(i, j, k) == Block.TNT.id;
|
||||||
|
// CraftBukkit start: BlockBurnEvent
|
||||||
|
Server server = ((WorldServer)world).getServer();
|
||||||
|
CraftWorld cworld = ((WorldServer)world).getWorld();
|
||||||
|
org.bukkit.block.Block theBlock = (cworld.getBlockAt(i, j, k));
|
||||||
|
BlockBurnEvent burnEvent = new BlockBurnEvent(theBlock);
|
||||||
|
server.getPluginManager().callEvent(burnEvent);
|
||||||
|
if(!burnEvent.isCancelled()) {
|
||||||
if (random.nextInt(2) == 0) {
|
if (random.nextInt(2) == 0) {
|
||||||
world.e(i, j, k, this.id);
|
world.e(i, j, k, this.id);
|
||||||
} else {
|
} else {
|
||||||
@ -131,6 +137,8 @@ public class BlockFire extends Block {
|
|||||||
Block.TNT.a(world, i, j, k, 0);
|
Block.TNT.a(world, i, j, k, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// CraftBukkit end: BlockBurnEvent
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start -- fix cast to IBlockAccess
|
// CraftBukkit start -- fix cast to IBlockAccess
|
||||||
|
Loading…
Reference in New Issue
Block a user