BlockIgniteEvent: How to get the block burning?

Discussion in 'Plugin Development' started by V10lator, Nov 21, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    V10lator

    I just realized that getBlock() from the BlockIgniteEvent always returns air. But how to get the block that's burning? A simple BlockFace.DOWN isn't enough cause blocks can burn at their sides or at the bottom, too. Or do all blocks around that air block automatically burn, so I have to loop through all block faces (except NORTH_EAST and such) ?

    //EDIT: BTW: I'm talking about the block that starts to burn, not the one that it spreaded from.
     
  2. Offline

    nisovin

    If there is a block below, that block will be burning, otherwise the adjacent blocks and one above will be burning. That's just a graphical thing, though. Those blocks don't have any sort of "burning" state, they just happen to be next to a fire block.
     
  3. Offline

    V10lator

    nisovin: I don't need a graphical thing. So I guess if there are more blocks connected to the fire block (the one that's air in the BlockIgniteEvent) every one of them is burning (meaning they can give a BlockBurnEvent without any other notice before) ?
     
  4. Offline

    nisovin

    You're asking about a graphical thing. The only block on fire is the actual fire block. The blocks next to it are just blocks. It may look like they're burning, but they aren't, they're just next to fire.
     
    V10lator likes this.
Thread Status:
Not open for further replies.

Share This Page