Package net.minecraft.structure
Class StructurePiece
java.lang.Object
net.minecraft.structure.StructurePiece
- Direct Known Subclasses:
BuriedTreasureGenerator.Piece,MineshaftGenerator.MineshaftPart,NetherFortressGenerator.Piece,OceanMonumentGenerator.Piece,PoolStructurePiece,SimpleStructurePiece,StrongholdGenerator.Piece,StructurePieceWithDimensions
public abstract class StructurePiece extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStructurePiece.BlockRandomizer -
Field Summary
Fields Modifier and Type Field Description protected static BlockStateAIRprivate static Set<Block>BLOCKS_NEEDING_POST_PROCESSINGprotected BlockBoxboundingBoxprivate Directionfacingprotected intlengthprivate BlockMirrormirrorprivate BlockRotationrotationprivate StructurePieceTypetype -
Constructor Summary
Constructors Modifier Constructor Description protectedStructurePiece(StructurePieceType type, int length)StructurePiece(StructurePieceType type, CompoundTag tag) -
Method Summary
Modifier and Type Method Description protected voidaddBlock(WorldAccess world, BlockState block, int x, int y, int z, BlockBox blockBox)protected voidaddBlockWithRandomThreshold(WorldAccess world, BlockBox bounds, Random random, float threshold, int x, int y, int z, BlockState blockState)protected booleanaddChest(WorldAccess world, BlockBox boundingBox, Random random, int x, int y, int z, Identifier lootTableId)protected booleanaddChest(WorldAccess world, BlockBox boundingBox, Random random, BlockPos pos, Identifier lootTableId, BlockState block)protected booleanaddDispenser(WorldAccess world, BlockBox boundingBox, Random random, int x, int y, int z, Direction facing, Identifier lootTbaleId)protected intapplyXTransform(int int2, int int3)protected intapplyYTransform(int int2)protected intapplyZTransform(int int2, int int3)protected voidfill(WorldAccess world, BlockBox bounds, int minX, int minY, int minZ, int maxX, int maxY, int int2)protected voidfillWithOutline(WorldAccess worldAccess, BlockBox blockBox, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, boolean replaceBlocks, Random random, StructurePiece.BlockRandomizer blockRandomizer)protected voidfillWithOutline(WorldAccess world, BlockBox blockBox, int int2, int int3, int int4, int int5, int int6, int int7, BlockState blockState, BlockState inside, boolean bool)protected voidfillWithOutlineUnderSealevel(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 booleangenerate(ServerWorldAccess serverWorldAccess, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, Random random, BlockBox boundingBox, ChunkPos chunkPos, BlockPos blockPos)protected BlockStategetBlockAt(BlockView blockView, int x, int y, int z, BlockBox blockBox)BlockBoxgetBoundingBox()DirectiongetFacing()intgetLength()static StructurePiecegetOverlappingPiece(List<StructurePiece> list, BlockBox blockBox)BlockRotationgetRotation()CompoundTaggetTag()StructurePieceTypegetType()booleanintersectsChunk(ChunkPos chunkPos, int offset)protected booleanisUnderSeaLevel(WorldView worldView, int x, int z, int y, BlockBox blockBox)static BlockStatemethod_14916(BlockView blockView, BlockPos blockPos, BlockState blockState)protected voidmethod_14919(WorldAccess world, BlockBox bounds, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, BlockState block, boolean bool)protected voidmethod_14936(WorldAccess world, BlockState blockState, int x, int y, int z, BlockBox blockBox)protected booleanmethod_14937(BlockView blockView, BlockBox blockBox)voidplaceJigsaw(StructurePiece structurePiece, List<StructurePiece> list, Random random)voidsetOrientation(Direction orientation)protected abstract voidtoNbt(CompoundTag tag)voidtranslate(int x, int y, int z)
-
Field Details
-
AIR
-
BLOCKS_NEEDING_POST_PROCESSING
-
boundingBox
-
facing
-
mirror
-
rotation
-
length
protected int length -
type
-
-
Constructor Details
-
Method Details
-
getTag
-
toNbt
-
placeJigsaw
-
generate
public abstract boolean generate(ServerWorldAccess serverWorldAccess, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, Random random, BlockBox boundingBox, ChunkPos chunkPos, BlockPos blockPos) -
getBoundingBox
-
getLength
public int getLength() -
intersectsChunk
-
getOverlappingPiece
-
method_14937
-
applyXTransform
protected int applyXTransform(int int2, int int3) -
applyYTransform
protected int applyYTransform(int int2) -
applyZTransform
protected int applyZTransform(int int2, int int3) -
addBlock
protected void addBlock(WorldAccess world, BlockState block, int x, int y, int z, BlockBox blockBox) -
getBlockAt
-
isUnderSeaLevel
-
fill
protected void fill(WorldAccess world, BlockBox bounds, int minX, int minY, int minZ, int maxX, int maxY, int int2) -
fillWithOutline
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) -
fillWithOutline
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) -
fillWithOutlineUnderSealevel
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) -
addBlockWithRandomThreshold
protected void addBlockWithRandomThreshold(WorldAccess world, BlockBox bounds, Random random, float threshold, int x, int y, int z, BlockState blockState) -
method_14919
protected void method_14919(WorldAccess world, BlockBox bounds, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, BlockState block, boolean bool) -
method_14936
protected void method_14936(WorldAccess world, BlockState blockState, int x, int y, int z, BlockBox blockBox) -
addChest
protected boolean addChest(WorldAccess world, BlockBox boundingBox, Random random, int x, int y, int z, Identifier lootTableId) -
method_14916
public static BlockState method_14916(BlockView blockView, BlockPos blockPos, BlockState blockState) -
addChest
protected boolean addChest(WorldAccess world, BlockBox boundingBox, Random random, BlockPos pos, Identifier lootTableId, @Nullable BlockState block) -
addDispenser
protected boolean addDispenser(WorldAccess world, BlockBox boundingBox, Random random, int x, int y, int z, Direction facing, Identifier lootTbaleId) -
translate
public void translate(int x, int y, int z) -
getFacing
-
setOrientation
-
getRotation
-
getType
-