Make rebuildable a block attribute (#1338)
This commit is contained in:
committed by
Anuken
parent
105aeade1f
commit
406c11a14d
@@ -47,8 +47,8 @@ public class Logic implements ApplicationListener{
|
||||
//blocks that get broken are appended to the team's broken block queue
|
||||
Tile tile = event.tile;
|
||||
Block block = tile.block();
|
||||
//skip null entities or nukes, for obvious reasons; also skip client since they can't modify these requests
|
||||
if(tile.entity == null || tile.block() instanceof NuclearReactor || net.client()) return;
|
||||
//skip null entities or un-rebuildables, for obvious reasons; also skip client since they can't modify these requests
|
||||
if(tile.entity == null || !tile.block().rebuildable || net.client()) return;
|
||||
|
||||
if(block instanceof BuildBlock){
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ public class Block extends BlockStorage{
|
||||
public boolean rotate;
|
||||
/** whether you can break this with rightclick */
|
||||
public boolean breakable;
|
||||
/** whether to add this block to brokenblocks */
|
||||
public boolean rebuildable = true;
|
||||
/** whether this floor can be placed on. */
|
||||
public boolean placeableOn = true;
|
||||
/** whether this block has insulating properties. */
|
||||
|
||||
@@ -26,6 +26,7 @@ public class ShockMine extends Block{
|
||||
solid = false;
|
||||
targetable = false;
|
||||
layer = Layer.overlay;
|
||||
rebuildable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,6 +46,7 @@ public class NuclearReactor extends PowerGenerator{
|
||||
hasItems = true;
|
||||
hasLiquids = true;
|
||||
entityType = NuclearReactorEntity::new;
|
||||
rebuildable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user