Blocking the Client from relighting on block placement/block physics

Discussion in 'Plugin Development' started by FuzzeWuzze, Mar 30, 2011.

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

    FuzzeWuzze

    So my plugin PortableTorch allows players to have a headlamp style torch that follows them around by lighting the blocks around them.

    The issue is that when you place a block, the game resets all the lighting of the blocks regardless of the changes i made. This also happens if there is a block physics event like falling sand or gravel. I have a workaround in place right now to schedule a relight event 1 server tick after the block placement but its kinda hackish...because the light goes off immediately when the block is placed and then almost immediately turns back on...this causes some flashing that could kill peoples eyes in dark areas if placing blocks in dark areas.

    Also, im seeking a way to deal with the physics happening. On block placement its easy because i have the event and which player needs to be relit, but gamephysics events arent related to a player. Short of recalculating everyones torches when this happens im not sure how to deal with it for the same reason as block placement.
     
Thread Status:
Not open for further replies.

Share This Page