This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
EnergonRelics/src/main/java/com/thebrokenrail/energonrelics/structure/researchcomplex/ResearchComplexHallwayPart....

43 lines
1.2 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);
}
@Override
protected int getWidth() {
return 7;
}
@Override
protected int getHeight() {
return 6;
}
@Override
protected 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);
}
}
}
}