Graphical flames issue when removing mob spawner

Discussion in 'Plugin Development' started by R3ality, Apr 27, 2011.

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

    R3ality

    A frequently used block removing method in plugins is setting its type to air. Similarly to this:
    Code:
    Block b = (get the block from event, by coordinates or whichever way)
    b.setType(Material.AIR);
    This works fine in most cases. However when applying this method to monster spawners (blocks with the type of Material.MOB_SPAWNER) there is a minor issue - it leaves the flames animation in place (see images below). The flames are not damaging and do not prevent building in that spot.

    Before:
    javaw 2011-04-27 11-36-15-29.png

    After doing setType(Material.AIR);
    javaw 2011-04-27 11-36-22-10.png

    Things I have tried so far that have worked:
    • Reconnect to the server - after that the flaming animation is gone for that individual player
    Things I have tried so far that have NOT worked:
    • setting the block data to zero (b.setData((byte)0)) before or after setting type to air
    • setting the block type to something else (for example dirt, or even water :p) before setting it to air
    • manually placing a random block (for example dirt) at the exact spot and then breaking that
    Any ideas on how to overcome this (disable the flaming animation) without having to reconnect?
    Honestly it seems like a client issue, but when breaking the block normally (with diamond pickaxe) it does not occur.
     
Thread Status:
Not open for further replies.

Share This Page