Increased max block size

This commit is contained in:
Anuken
2020-03-06 16:31:09 -05:00
parent a02c7989b4
commit ae0b84cef0
2 changed files with 5 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ import mindustry.gen.*;
import mindustry.mod.Mods.*;
import mindustry.type.*;
import mindustry.world.*;
import mindustry.world.blocks.*;
import mindustry.world.consumers.*;
import mindustry.world.meta.*;
@@ -245,8 +246,8 @@ public class ContentParser{
readFields(block, value, true);
if(block.size > 8){
throw new IllegalArgumentException("Blocks cannot be larger than 8x8.");
if(block.size > BuildBlock.maxSize){
throw new IllegalArgumentException("Blocks cannot be larger than " + BuildBlock.maxSize);
}
//add research tech node

View File

@@ -24,7 +24,7 @@ import mindustry.world.modules.*;
import static mindustry.Vars.*;
public class BuildBlock extends Block{
public static final int maxSize = 9;
public static final int maxSize = 16;
private static final BuildBlock[] buildBlocks = new BuildBlock[maxSize];
private static long lastTime = 0;
@@ -39,7 +39,7 @@ public class BuildBlock extends Block{
layer = Layer.placement;
consumesTap = true;
solidifes = true;
buildBlocks[size - 1] = this;
buildBlocks[size - 1] = this;
}
/** Returns a BuildBlock by size. */