use of net.minecraft.world.level.block.Rotation in project SolarCraftRepository by FINDERFEED.
the class MagicianTowerStructure method generatePieces.
private static void generatePieces(StructurePiecesBuilder p_197089_, PieceGenerator.Context<NoneFeatureConfiguration> ctx) {
int x = (ctx.chunkPos().x << 4) + 7;
int z = (ctx.chunkPos().z << 4) + 7;
int surfaceY = ctx.chunkGenerator().getBaseHeight(x, z, Heightmap.Types.WORLD_SURFACE_WG, ctx.heightAccessor());
BlockPos blockpos = new BlockPos(x, surfaceY, z);
Rotation rotation = Rotation.getRandom(ctx.random());
MagicianTowerPieces.start(ctx.structureManager(), blockpos, rotation, p_197089_, ctx.random());
}
use of net.minecraft.world.level.block.Rotation in project SolarCraftRepository by FINDERFEED.
the class MazeStructure method generatePieces.
private static void generatePieces(StructurePiecesBuilder p_197089_, PieceGenerator.Context<NoneFeatureConfiguration> ctx) {
int x = (ctx.chunkPos().x << 4) + 7;
int z = (ctx.chunkPos().z << 4) + 7;
int surfaceY = ctx.chunkGenerator().getBaseHeight(x, z, Heightmap.Types.WORLD_SURFACE_WG, ctx.heightAccessor());
BlockPos blockpos = new BlockPos(x, surfaceY, z);
Rotation rotation = Rotation.getRandom(ctx.random());
MazeStructurePieces.start(ctx.structureManager(), blockpos, rotation, p_197089_, ctx.random());
}
use of net.minecraft.world.level.block.Rotation in project SolarCraftRepository by FINDERFEED.
the class RunicElementalArenaStructure method generatePieces.
private static void generatePieces(StructurePiecesBuilder p_197089_, PieceGenerator.Context<NoneFeatureConfiguration> ctx) {
int x = (ctx.chunkPos().x << 4) + 7;
int z = (ctx.chunkPos().z << 4) + 7;
int surfaceY = ctx.chunkGenerator().getBaseHeight(x, z, Heightmap.Types.WORLD_SURFACE_WG, ctx.heightAccessor());
BlockPos blockpos = new BlockPos(x - 9, surfaceY - 1, z - 9);
Rotation rotation = Rotation.getRandom(ctx.random());
RunicElementalArenaStructurePieces.start(ctx.structureManager(), blockpos, rotation, p_197089_, ctx.random());
}
use of net.minecraft.world.level.block.Rotation in project SolarCraftRepository by FINDERFEED.
the class DungeonOne method generatePieces.
private static void generatePieces(StructurePiecesBuilder p_197089_, PieceGenerator.Context<NoneFeatureConfiguration> ctx) {
int x = (ctx.chunkPos().x << 4) + 7;
int z = (ctx.chunkPos().z << 4) + 7;
int surfaceY = ctx.chunkGenerator().getBaseHeight(x, z, Heightmap.Types.WORLD_SURFACE_WG, ctx.heightAccessor());
BlockPos blockpos = new BlockPos(x, surfaceY, z);
Rotation rotation = Rotation.getRandom(ctx.random());
DungeonOnePieces.start(ctx.structureManager(), blockpos, rotation, p_197089_, ctx.random());
}
use of net.minecraft.world.level.block.Rotation in project BYG by AOCAWOL.
the class BYGAbstractTreeFeature method getTransformedPos.
public static BlockPos getTransformedPos(BYGTreeConfig config, BlockPos startPos, BlockPos pos) {
Rotation rotation = config.getRotation();
Mirror mirror = config.getMirror();
BlockPos blockPos = FeatureGenUtil.extractOffset(startPos, pos);
if (blockPos instanceof MutableBlockPos) {
FeatureGenUtil.transformMutable((MutableBlockPos) blockPos, mirror, rotation);
((MutableBlockPos) blockPos).move(startPos.getX(), 0, startPos.getZ());
return blockPos;
}
return FeatureGenUtil.transform(blockPos, mirror, rotation).offset(startPos.getX(), 0, startPos.getZ());
}
Aggregations