Update BuildBlock.java

This commit is contained in:
Anuken
2020-08-30 09:58:47 -05:00
committed by GitHub
parent 899b2f6aac
commit b1e39b1bcb

View File

@@ -61,9 +61,9 @@ public class BuildBlock extends Block{
if(tile == null) return;
float healthf = tile.build == null ? 1f : tile.build.healthf();
tile.setBlock(block, team, rotation);
tile.build.health = block.health * healthf;
if(tile.build != null) tile.build.health = block.health * healthf;
//last builder was this local client player, call placed()
if(!headless && builderID == player.unit().id()){
if(tile.build != null && !headless && builderID == player.unit().id()){
if(!skipConfig){
tile.build.playerPlaced();
}