Class StructurePiece
java.lang.Object
net.minecraft.world.level.levelgen.structure.StructurePiece
- Direct Known Subclasses:
BuriedTreasurePieces.BuriedTreasurePiece
,MineShaftPieces.MineShaftPiece
,NetherBridgePieces.NetherBridgePiece
,OceanMonumentPieces.OceanMonumentPiece
,PoolElementStructurePiece
,ScatteredFeaturePiece
,StrongholdPieces.StrongholdPiece
,TemplateStructurePiece
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected BoundingBox
protected static BlockState
protected int
private static org.apache.logging.log4j.Logger
private Mirror
private Direction
private Rotation
private StructurePieceType
-
Constructor Summary
ModifierConstructorDescriptionprotected
StructurePiece(StructurePieceType p_163538_, int p_163539_, BoundingBox p_163540_)
StructurePiece(StructurePieceType p_73390_, CompoundTag p_73391_)
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
addAdditionalSaveData(ServerLevel p_163551_, CompoundTag p_163552_)
void
addChildren(StructurePiece p_163574_, StructurePieceAccessor p_163575_, Random p_163576_)
protected boolean
canBeReplaced(LevelReader p_163553_, int p_163554_, int p_163555_, int p_163556_, BoundingBox p_163557_)
protected boolean
createChest(ServerLevelAccessor p_73421_, BoundingBox p_73422_, Random p_73423_, BlockPos p_73424_, ResourceLocation p_73425_, BlockState p_73426_)
protected boolean
createChest(WorldGenLevel p_73509_, BoundingBox p_73510_, Random p_73511_, int p_73512_, int p_73513_, int p_73514_, ResourceLocation p_73515_)
protected boolean
createDispenser(WorldGenLevel p_73501_, BoundingBox p_73502_, Random p_73503_, int p_73504_, int p_73505_, int p_73506_, Direction p_73507_, ResourceLocation p_73508_)
createTag(ServerLevel p_163550_)
protected void
fillColumnDown(WorldGenLevel p_73529_, BlockState p_73530_, int p_73531_, int p_73532_, int p_73533_, BoundingBox p_73534_)
protected void
generateAirBox(WorldGenLevel p_73536_, BoundingBox p_73537_, int p_73538_, int p_73539_, int p_73540_, int p_73541_, int p_73542_, int p_73543_)
protected void
generateBox(WorldGenLevel p_73465_, BoundingBox p_73466_, int p_73467_, int p_73468_, int p_73469_, int p_73470_, int p_73471_, int p_73472_, boolean p_73473_, Random p_73474_, StructurePiece.BlockSelector p_73475_)
protected void
generateBox(WorldGenLevel p_73442_, BoundingBox p_73443_, int p_73444_, int p_73445_, int p_73446_, int p_73447_, int p_73448_, int p_73449_, BlockState p_73450_, BlockState p_73451_, boolean p_73452_)
protected void
generateBox(WorldGenLevel p_163566_, BoundingBox p_163567_, BoundingBox p_163568_, boolean p_163569_, Random p_163570_, StructurePiece.BlockSelector p_163571_)
protected void
generateBox(WorldGenLevel p_163559_, BoundingBox p_163560_, BoundingBox p_163561_, BlockState p_163562_, BlockState p_163563_, boolean p_163564_)
protected void
generateMaybeBox(WorldGenLevel p_73477_, BoundingBox p_73478_, Random p_73479_, float p_73480_, int p_73481_, int p_73482_, int p_73483_, int p_73484_, int p_73485_, int p_73486_, BlockState p_73487_, BlockState p_73488_, boolean p_73489_, boolean p_73490_)
protected void
generateUpperHalfSphere(WorldGenLevel p_73454_, BoundingBox p_73455_, int p_73456_, int p_73457_, int p_73458_, int p_73459_, int p_73460_, int p_73461_, BlockState p_73462_, boolean p_73463_)
protected BlockState
getBlock(BlockGetter p_73399_, int p_73400_, int p_73401_, int p_73402_, BoundingBox p_73403_)
int
protected static Direction
getRandomHorizontalDirection(Random p_163581_)
getType()
protected BlockPos.MutableBlockPos
getWorldPos(int p_163583_, int p_163584_, int p_163585_)
protected int
getWorldX(int p_73393_, int p_73394_)
protected int
getWorldY(int p_73545_)
protected int
getWorldZ(int p_73526_, int p_73527_)
boolean
isCloseToChunk(ChunkPos p_73412_, int p_73413_)
protected boolean
isInterior(LevelReader p_73415_, int p_73416_, int p_73417_, int p_73418_, BoundingBox p_73419_)
protected boolean
isReplaceableByStructures(BlockState p_163573_)
protected static BoundingBox
makeBoundingBox(int p_163542_, int p_163543_, int p_163544_, Direction p_163545_, int p_163546_, int p_163547_, int p_163548_)
protected void
maybeGenerateBlock(WorldGenLevel p_73492_, BoundingBox p_73493_, Random p_73494_, float p_73495_, int p_73496_, int p_73497_, int p_73498_, BlockState p_73499_)
void
move(int p_73395_, int p_73396_, int p_73397_)
protected void
placeBlock(WorldGenLevel p_73435_, BlockState p_73436_, int p_73437_, int p_73438_, int p_73439_, BoundingBox p_73440_)
abstract boolean
postProcess(WorldGenLevel p_73427_, StructureFeatureManager p_73428_, ChunkGenerator p_73429_, Random p_73430_, BoundingBox p_73431_, ChunkPos p_73432_, BlockPos p_73433_)
static BlockState
reorient(BlockGetter p_73408_, BlockPos p_73409_, BlockState p_73410_)
void
setOrientation(Direction p_73520_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
CAVE_AIR
-
boundingBox
-
orientation
-
mirror
-
rotation
-
genDepth
protected int genDepth -
type
-
SHAPE_CHECK_BLOCKS
-
-
Constructor Details
-
StructurePiece
-
StructurePiece
-
-
Method Details
-
makeBoundingBox
protected static BoundingBox makeBoundingBox(int p_163542_, int p_163543_, int p_163544_, Direction p_163545_, int p_163546_, int p_163547_, int p_163548_) -
getRandomHorizontalDirection
-
createTag
-
addAdditionalSaveData
-
getNoiseEffect
-
addChildren
public void addChildren(StructurePiece p_163574_, StructurePieceAccessor p_163575_, Random p_163576_) -
postProcess
public abstract boolean postProcess(WorldGenLevel p_73427_, StructureFeatureManager p_73428_, ChunkGenerator p_73429_, Random p_73430_, BoundingBox p_73431_, ChunkPos p_73432_, BlockPos p_73433_) -
getBoundingBox
-
getGenDepth
public int getGenDepth() -
isCloseToChunk
-
getLocatorPosition
-
getWorldPos
-
getWorldX
protected int getWorldX(int p_73393_, int p_73394_) -
getWorldY
protected int getWorldY(int p_73545_) -
getWorldZ
protected int getWorldZ(int p_73526_, int p_73527_) -
placeBlock
protected void placeBlock(WorldGenLevel p_73435_, BlockState p_73436_, int p_73437_, int p_73438_, int p_73439_, BoundingBox p_73440_) -
canBeReplaced
protected boolean canBeReplaced(LevelReader p_163553_, int p_163554_, int p_163555_, int p_163556_, BoundingBox p_163557_) -
getBlock
protected BlockState getBlock(BlockGetter p_73399_, int p_73400_, int p_73401_, int p_73402_, BoundingBox p_73403_) -
isInterior
protected boolean isInterior(LevelReader p_73415_, int p_73416_, int p_73417_, int p_73418_, BoundingBox p_73419_) -
generateAirBox
protected void generateAirBox(WorldGenLevel p_73536_, BoundingBox p_73537_, int p_73538_, int p_73539_, int p_73540_, int p_73541_, int p_73542_, int p_73543_) -
generateBox
protected void generateBox(WorldGenLevel p_73442_, BoundingBox p_73443_, int p_73444_, int p_73445_, int p_73446_, int p_73447_, int p_73448_, int p_73449_, BlockState p_73450_, BlockState p_73451_, boolean p_73452_) -
generateBox
protected void generateBox(WorldGenLevel p_163559_, BoundingBox p_163560_, BoundingBox p_163561_, BlockState p_163562_, BlockState p_163563_, boolean p_163564_) -
generateBox
protected void generateBox(WorldGenLevel p_73465_, BoundingBox p_73466_, int p_73467_, int p_73468_, int p_73469_, int p_73470_, int p_73471_, int p_73472_, boolean p_73473_, Random p_73474_, StructurePiece.BlockSelector p_73475_) -
generateBox
protected void generateBox(WorldGenLevel p_163566_, BoundingBox p_163567_, BoundingBox p_163568_, boolean p_163569_, Random p_163570_, StructurePiece.BlockSelector p_163571_) -
generateMaybeBox
protected void generateMaybeBox(WorldGenLevel p_73477_, BoundingBox p_73478_, Random p_73479_, float p_73480_, int p_73481_, int p_73482_, int p_73483_, int p_73484_, int p_73485_, int p_73486_, BlockState p_73487_, BlockState p_73488_, boolean p_73489_, boolean p_73490_) -
maybeGenerateBlock
protected void maybeGenerateBlock(WorldGenLevel p_73492_, BoundingBox p_73493_, Random p_73494_, float p_73495_, int p_73496_, int p_73497_, int p_73498_, BlockState p_73499_) -
generateUpperHalfSphere
protected void generateUpperHalfSphere(WorldGenLevel p_73454_, BoundingBox p_73455_, int p_73456_, int p_73457_, int p_73458_, int p_73459_, int p_73460_, int p_73461_, BlockState p_73462_, boolean p_73463_) -
fillColumnDown
protected void fillColumnDown(WorldGenLevel p_73529_, BlockState p_73530_, int p_73531_, int p_73532_, int p_73533_, BoundingBox p_73534_) -
isReplaceableByStructures
-
createChest
protected boolean createChest(WorldGenLevel p_73509_, BoundingBox p_73510_, Random p_73511_, int p_73512_, int p_73513_, int p_73514_, ResourceLocation p_73515_) -
reorient
-
createChest
protected boolean createChest(ServerLevelAccessor p_73421_, BoundingBox p_73422_, Random p_73423_, BlockPos p_73424_, ResourceLocation p_73425_, @Nullable BlockState p_73426_) -
createDispenser
protected boolean createDispenser(WorldGenLevel p_73501_, BoundingBox p_73502_, Random p_73503_, int p_73504_, int p_73505_, int p_73506_, Direction p_73507_, ResourceLocation p_73508_) -
move
public void move(int p_73395_, int p_73396_, int p_73397_) -
getOrientation
-
setOrientation
-
getRotation
-
getMirror
-
getType
-