36 lines
1.1 KiB
Java
36 lines
1.1 KiB
Java
package com.thebrokenrail.energonrelics.structure.researchcomplex;
|
|
|
|
import com.thebrokenrail.energonrelics.structure.StructureContext;
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.block.Blocks;
|
|
|
|
import java.util.List;
|
|
|
|
public class ResearchComplexHallwayPart extends BaseResearchComplexPart {
|
|
public ResearchComplexHallwayPart(ResearchComplexState state, List<Transformation> list) {
|
|
super(state, list);
|
|
}
|
|
|
|
private int getHeight() {
|
|
return 6;
|
|
}
|
|
|
|
private int getDepth() {
|
|
return 3;
|
|
}
|
|
|
|
@Override
|
|
protected void build(StructureContext context) {
|
|
BlockState bricks = Blocks.QUARTZ_BRICKS.getDefaultState();
|
|
BlockState air = Blocks.AIR.getDefaultState();
|
|
for (int y = 0; y < getHeight(); y++) {
|
|
boolean isBricks = y == 0 || y == getHeight() - 1;
|
|
BlockState state = isBricks ? bricks : air;
|
|
rect(2, y, 0, 3, 1, getDepth(), state);
|
|
if (y > 1 && y < getHeight() - 2) {
|
|
rect(0, y, 0, 1, 2, getDepth(), bricks);
|
|
}
|
|
}
|
|
}
|
|
}
|