27 lines
1.1 KiB
Java
27 lines
1.1 KiB
Java
|
package com.thebrokenrail.reliccraft.structure;
|
||
|
|
||
|
import net.minecraft.structure.StructureManager;
|
||
|
import net.minecraft.structure.StructureStart;
|
||
|
import net.minecraft.util.BlockRotation;
|
||
|
import net.minecraft.util.math.BlockBox;
|
||
|
import net.minecraft.util.math.BlockPos;
|
||
|
import net.minecraft.world.biome.Biome;
|
||
|
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||
|
import net.minecraft.world.gen.feature.StructureFeature;
|
||
|
|
||
|
public class TimeTempleStructureStart extends StructureStart {
|
||
|
public TimeTempleStructureStart(StructureFeature<?> feature, int chunkX, int chunkZ, BlockBox box, int references, long l) {
|
||
|
super(feature, chunkX, chunkZ, box, references, l);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void initialize(ChunkGenerator<?> chunkGenerator, StructureManager structureManager, int x, int z, Biome biome) {
|
||
|
int i = x * 16;
|
||
|
int j = z * 16;
|
||
|
BlockPos blockPos = new BlockPos(i, 90, j);
|
||
|
BlockRotation blockRotation = BlockRotation.values()[random.nextInt(BlockRotation.values().length)];
|
||
|
TimeTempleGenerator.addPieces(structureManager, blockPos, blockRotation, children);
|
||
|
setBoundingBoxFromChildren();
|
||
|
}
|
||
|
}
|