Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Re-add BlockBurnEvent
Dieser Commit ist enthalten in:
Ursprung
914688e2a0
Commit
35aac12235
@ -120,16 +120,24 @@ 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) {
|
||||||
|
world.e(i, j, k, this.id);
|
||||||
|
} else {
|
||||||
|
world.e(i, j, k, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (random.nextInt(2) == 0) {
|
if (flag) {
|
||||||
world.e(i, j, k, this.id);
|
Block.TNT.a(world, i, j, k, 0);
|
||||||
} else {
|
}
|
||||||
world.e(i, j, k, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag) {
|
|
||||||
Block.TNT.a(world, i, j, k, 0);
|
|
||||||
}
|
}
|
||||||
|
// CraftBukkit end: BlockBurnEvent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren