Class StructurePiece
java.lang.Object
net.minecraft.world.level.levelgen.structure.StructurePiece
- Direct Known Subclasses:
BuriedTreasurePieces.BuriedTreasurePiece
,MineshaftPieces.MineShaftPiece
,NetherFortressPieces.NetherBridgePiece
,OceanMonumentPieces.OceanMonumentPiece
,PoolElementStructurePiece
,ScatteredFeaturePiece
,StrongholdPieces.StrongholdPiece
,TemplateStructurePiece
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected BoundingBox
protected static final BlockState
protected int
private static final org.slf4j.Logger
private Mirror
private Direction
private Rotation
private final StructurePieceType
-
Constructor Summary
ModifierConstructorDescriptionprotected
StructurePiece
(StructurePieceType p_209994_, int p_209995_, BoundingBox p_209996_) StructurePiece
(StructurePieceType p_209998_, CompoundTag p_209999_) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
addAdditionalSaveData
(StructurePieceSerializationContext p_192646_, CompoundTag p_192647_) void
addChildren
(StructurePiece p_226835_, StructurePieceAccessor p_226836_, RandomSource p_226837_) protected boolean
canBeReplaced
(LevelReader p_163553_, int p_163554_, int p_163555_, int p_163556_, BoundingBox p_163557_) static BoundingBox
createBoundingBox
(Stream<StructurePiece> p_192652_) protected boolean
createChest
(ServerLevelAccessor p_226763_, BoundingBox p_226764_, RandomSource p_226765_, BlockPos p_226766_, ResourceKey<LootTable> p_328482_, BlockState p_226768_) protected boolean
createChest
(WorldGenLevel p_226812_, BoundingBox p_226813_, RandomSource p_226814_, int p_226815_, int p_226816_, int p_226817_, ResourceKey<LootTable> p_333539_) protected boolean
createDispenser
(WorldGenLevel p_226820_, BoundingBox p_226821_, RandomSource p_226822_, int p_226823_, int p_226824_, int p_226825_, Direction p_226826_, ResourceKey<LootTable> p_327917_) final CompoundTag
createTag
(StructurePieceSerializationContext p_192645_) protected void
fillColumnDown
(WorldGenLevel p_73529_, BlockState p_73530_, int p_73531_, int p_73532_, int p_73533_, BoundingBox p_73534_) static StructurePiece
findCollisionPiece
(List<StructurePiece> p_192649_, BoundingBox p_192650_) 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_226777_, BoundingBox p_226778_, int p_226779_, int p_226780_, int p_226781_, int p_226782_, int p_226783_, int p_226784_, boolean p_226785_, RandomSource p_226786_, StructurePiece.BlockSelector p_226787_) 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_226829_, BoundingBox p_226830_, BoundingBox p_226831_, boolean p_226832_, RandomSource p_226833_, StructurePiece.BlockSelector p_226834_) 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_226789_, BoundingBox p_226790_, RandomSource p_226791_, float p_226792_, int p_226793_, int p_226794_, int p_226795_, int p_226796_, int p_226797_, int p_226798_, BlockState p_226799_, BlockState p_226800_, boolean p_226801_, boolean p_226802_) 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
(RandomSource p_226761_) 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_226804_, BoundingBox p_226805_, RandomSource p_226806_, float p_226807_, int p_226808_, int p_226809_, int p_226810_, BlockState p_226811_) 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 void
postProcess
(WorldGenLevel p_226769_, StructureManager p_226770_, ChunkGenerator p_226771_, RandomSource p_226772_, BoundingBox p_226773_, ChunkPos p_226774_, BlockPos p_226775_) static BlockState
reorient
(BlockGetter p_73408_, BlockPos p_73409_, BlockState p_73410_) void
setGenDepth
(int p_226759_) void
setOrientation
(Direction p_73520_)
-
Field Details
-
LOGGER
private static final org.slf4j.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
protected abstract void addAdditionalSaveData(StructurePieceSerializationContext p_192646_, CompoundTag p_192647_) -
addChildren
public void addChildren(StructurePiece p_226835_, StructurePieceAccessor p_226836_, RandomSource p_226837_) -
postProcess
public abstract void postProcess(WorldGenLevel p_226769_, StructureManager p_226770_, ChunkGenerator p_226771_, RandomSource p_226772_, BoundingBox p_226773_, ChunkPos p_226774_, BlockPos p_226775_) -
getBoundingBox
-
getGenDepth
public int getGenDepth() -
setGenDepth
public void setGenDepth(int p_226759_) -
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_226777_, BoundingBox p_226778_, int p_226779_, int p_226780_, int p_226781_, int p_226782_, int p_226783_, int p_226784_, boolean p_226785_, RandomSource p_226786_, StructurePiece.BlockSelector p_226787_) -
generateBox
protected void generateBox(WorldGenLevel p_226829_, BoundingBox p_226830_, BoundingBox p_226831_, boolean p_226832_, RandomSource p_226833_, StructurePiece.BlockSelector p_226834_) -
generateMaybeBox
protected void generateMaybeBox(WorldGenLevel p_226789_, BoundingBox p_226790_, RandomSource p_226791_, float p_226792_, int p_226793_, int p_226794_, int p_226795_, int p_226796_, int p_226797_, int p_226798_, BlockState p_226799_, BlockState p_226800_, boolean p_226801_, boolean p_226802_) -
maybeGenerateBlock
protected void maybeGenerateBlock(WorldGenLevel p_226804_, BoundingBox p_226805_, RandomSource p_226806_, float p_226807_, int p_226808_, int p_226809_, int p_226810_, BlockState p_226811_) -
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_226812_, BoundingBox p_226813_, RandomSource p_226814_, int p_226815_, int p_226816_, int p_226817_, ResourceKey<LootTable> p_333539_) -
reorient
-
createChest
protected boolean createChest(ServerLevelAccessor p_226763_, BoundingBox p_226764_, RandomSource p_226765_, BlockPos p_226766_, ResourceKey<LootTable> p_328482_, @Nullable BlockState p_226768_) -
createDispenser
protected boolean createDispenser(WorldGenLevel p_226820_, BoundingBox p_226821_, RandomSource p_226822_, int p_226823_, int p_226824_, int p_226825_, Direction p_226826_, ResourceKey<LootTable> p_327917_) -
move
public void move(int p_73395_, int p_73396_, int p_73397_) -
createBoundingBox
-
findCollisionPiece
@Nullable public static StructurePiece findCollisionPiece(List<StructurePiece> p_192649_, BoundingBox p_192650_) -
getOrientation
-
setOrientation
-
getRotation
-
getMirror
-
getType
-