Changed deconstruct event to fire before tile removal

This commit is contained in:
Anuken
2020-01-20 15:00:38 -05:00
parent d2bc2baefe
commit a4ac318c9e

View File

@ -57,8 +57,8 @@ public class BuildBlock extends Block{
public static void onDeconstructFinish(Tile tile, Block block, int builderID){
Team team = tile.getTeam();
Effects.effect(Fx.breakBlock, tile.drawx(), tile.drawy(), block.size);
tile.remove();
Events.fire(new BlockBuildEndEvent(tile, playerGroup.getByID(builderID), team, true));
tile.remove();
if(shouldPlay()) Sounds.breaks.at(tile, calcPitch(false));
}