public abstract class StructurePiece extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StructurePiece.BlockRandomizer |
| Modifier and Type | Field and Description |
|---|---|
protected static BlockState |
AIR |
private static Set<Block> |
BLOCKS_NEEDING_POST_PROCESSING |
protected BlockBox |
boundingBox |
private Direction |
facing |
protected int |
length |
private BlockMirror |
mirror |
private BlockRotation |
rotation |
private StructurePieceType |
type |
| Modifier | Constructor and Description |
|---|---|
|
StructurePiece(StructurePieceType type,
CompoundTag tag) |
protected |
StructurePiece(StructurePieceType type,
int length) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBlock(WorldAccess world,
BlockState block,
int x,
int y,
int z,
BlockBox blockBox) |
protected void |
addBlockWithRandomThreshold(WorldAccess world,
BlockBox bounds,
Random random,
float threshold,
int x,
int y,
int z,
BlockState blockState) |
protected boolean |
addChest(WorldAccess world,
BlockBox boundingBox,
Random random,
BlockPos pos,
Identifier lootTableId,
BlockState block) |
protected boolean |
addChest(WorldAccess world,
BlockBox boundingBox,
Random random,
int x,
int y,
int z,
Identifier lootTableId) |
protected boolean |
addDispenser(WorldAccess world,
BlockBox boundingBox,
Random random,
int x,
int y,
int z,
Direction facing,
Identifier lootTableId) |
protected int |
applyXTransform(int int2,
int int3) |
protected int |
applyYTransform(int int2) |
protected int |
applyZTransform(int int2,
int int3) |
protected void |
fill(WorldAccess world,
BlockBox bounds,
int minX,
int minY,
int minZ,
int maxX,
int maxY,
int int2) |
protected void |
fillWithOutline(WorldAccess world,
BlockBox blockBox,
int int2,
int int3,
int int4,
int int5,
int int6,
int int7,
BlockState blockState,
BlockState inside,
boolean bool) |
protected void |
fillWithOutline(WorldAccess worldAccess,
BlockBox blockBox,
int minX,
int minY,
int minZ,
int maxX,
int maxY,
int maxZ,
boolean replaceBlocks,
Random random,
StructurePiece.BlockRandomizer blockRandomizer) |
protected void |
fillWithOutlineUnderSeaLevel(WorldAccess worldAccess,
BlockBox blockBox,
Random random,
float float2,
int int2,
int int3,
int int4,
int int5,
int int6,
int int7,
BlockState blockState,
BlockState blockState2,
boolean bool,
boolean bool2) |
abstract boolean |
generate(ServerWorldAccess serverWorldAccess,
StructureAccessor structureAccessor,
ChunkGenerator chunkGenerator,
Random random,
BlockBox boundingBox,
ChunkPos chunkPos,
BlockPos blockPos) |
protected BlockState |
getBlockAt(BlockView blockView,
int x,
int y,
int z,
BlockBox blockBox) |
BlockBox |
getBoundingBox() |
Direction |
getFacing() |
int |
getLength() |
static StructurePiece |
getOverlappingPiece(List<StructurePiece> list,
BlockBox blockBox) |
BlockRotation |
getRotation() |
CompoundTag |
getTag() |
StructurePieceType |
getType() |
boolean |
intersectsChunk(ChunkPos chunkPos,
int offset) |
protected boolean |
isUnderSeaLevel(WorldView worldView,
int x,
int z,
int y,
BlockBox blockBox) |
static BlockState |
method_14916(BlockView blockView,
BlockPos blockPos,
BlockState blockState) |
protected void |
method_14919(WorldAccess world,
BlockBox bounds,
int minX,
int minY,
int minZ,
int maxX,
int maxY,
int maxZ,
BlockState block,
boolean bool) |
protected void |
method_14936(WorldAccess world,
BlockState blockState,
int x,
int y,
int z,
BlockBox blockBox) |
protected boolean |
method_14937(BlockView blockView,
BlockBox blockBox) |
void |
placeJigsaw(StructurePiece structurePiece,
List<StructurePiece> list,
Random random) |
void |
setOrientation(Direction orientation) |
protected abstract void |
toNbt(CompoundTag tag) |
void |
translate(int x,
int y,
int z) |
protected static final BlockState AIR
protected BlockBox boundingBox
private BlockMirror mirror
private BlockRotation rotation
protected int length
private final StructurePieceType type
protected StructurePiece(StructurePieceType type, int length)
public StructurePiece(StructurePieceType type, CompoundTag tag)
public final CompoundTag getTag()
protected abstract void toNbt(CompoundTag tag)
public void placeJigsaw(StructurePiece structurePiece, List<StructurePiece> list, Random random)
public abstract boolean generate(ServerWorldAccess serverWorldAccess, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, Random random, BlockBox boundingBox, ChunkPos chunkPos, BlockPos blockPos)
public BlockBox getBoundingBox()
public int getLength()
public boolean intersectsChunk(ChunkPos chunkPos, int offset)
public static StructurePiece getOverlappingPiece(List<StructurePiece> list, BlockBox blockBox)
protected int applyXTransform(int int2,
int int3)
protected int applyYTransform(int int2)
protected int applyZTransform(int int2,
int int3)
protected void addBlock(WorldAccess world, BlockState block, int x, int y, int z, BlockBox blockBox)
protected BlockState getBlockAt(BlockView blockView, int x, int y, int z, BlockBox blockBox)
protected boolean isUnderSeaLevel(WorldView worldView, int x, int z, int y, BlockBox blockBox)
protected void fill(WorldAccess world, BlockBox bounds, int minX, int minY, int minZ, int maxX, int maxY, int int2)
protected void fillWithOutline(WorldAccess world, BlockBox blockBox, int int2, int int3, int int4, int int5, int int6, int int7, BlockState blockState, BlockState inside, boolean bool)
protected void fillWithOutline(WorldAccess worldAccess, BlockBox blockBox, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, boolean replaceBlocks, Random random, StructurePiece.BlockRandomizer blockRandomizer)
protected void fillWithOutlineUnderSeaLevel(WorldAccess worldAccess, BlockBox blockBox, Random random, float float2, int int2, int int3, int int4, int int5, int int6, int int7, BlockState blockState, BlockState blockState2, boolean bool, boolean bool2)
protected void addBlockWithRandomThreshold(WorldAccess world, BlockBox bounds, Random random, float threshold, int x, int y, int z, BlockState blockState)
protected void method_14919(WorldAccess world, BlockBox bounds, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, BlockState block, boolean bool)
protected void method_14936(WorldAccess world, BlockState blockState, int x, int y, int z, BlockBox blockBox)
protected boolean addChest(WorldAccess world, BlockBox boundingBox, Random random, int x, int y, int z, Identifier lootTableId)
public static BlockState method_14916(BlockView blockView, BlockPos blockPos, BlockState blockState)
protected boolean addChest(WorldAccess world, BlockBox boundingBox, Random random, BlockPos pos, Identifier lootTableId, @Nullable BlockState block)
protected boolean addDispenser(WorldAccess world, BlockBox boundingBox, Random random, int x, int y, int z, Direction facing, Identifier lootTableId)
public void translate(int x,
int y,
int z)
public BlockRotation getRotation()
public StructurePieceType getType()