Class TemplateStructurePiece
java.lang.Object
net.minecraft.world.level.levelgen.structure.StructurePiece
net.minecraft.world.level.levelgen.structure.TemplateStructurePiece
- Direct Known Subclasses:
EndCityPieces.EndCityPiece
,IglooPieces.IglooPiece
,NetherFossilPieces.NetherFossilPiece
,OceanRuinPieces.OceanRuinPiece
,RuinedPortalPiece
,ShipwreckPieces.ShipwreckPiece
,WoodlandMansionPieces.WoodlandMansionPiece
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.levelgen.structure.StructurePiece
StructurePiece.BlockSelector
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
protected StructurePlaceSettings
protected StructureTemplate
protected final String
protected BlockPos
Fields inherited from class net.minecraft.world.level.levelgen.structure.StructurePiece
boundingBox, CAVE_AIR, genDepth
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateStructurePiece
(StructurePieceType pType, int pGenDepth, StructureTemplateManager pStructureTemplateManager, ResourceLocation pLocation, String pTemplateName, StructurePlaceSettings pPlaceSettings, BlockPos pTemplatePosition) TemplateStructurePiece
(StructurePieceType pType, CompoundTag pTag, StructureTemplateManager pStructureTemplateManager, Function<ResourceLocation, StructurePlaceSettings> pPlaceSettingsFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAdditionalSaveData
(StructurePieceSerializationContext pContext, CompoundTag pTag) protected abstract void
handleDataMarker
(String pName, BlockPos pPos, ServerLevelAccessor pLevel, RandomSource pRandom, BoundingBox pBox) protected ResourceLocation
void
move
(int pX, int pY, int pZ) Deprecated.void
postProcess
(WorldGenLevel pLevel, StructureManager pStructureManager, ChunkGenerator pGenerator, RandomSource pRandom, BoundingBox pBox, ChunkPos pChunkPos, BlockPos pPos) template()
Methods inherited from class net.minecraft.world.level.levelgen.structure.StructurePiece
addChildren, canBeReplaced, createBoundingBox, createChest, createChest, createDispenser, createTag, fillColumnDown, findCollisionPiece, generateAirBox, generateBox, generateBox, generateBox, generateBox, generateMaybeBox, generateUpperHalfSphere, getBlock, getBoundingBox, getGenDepth, getLocatorPosition, getMirror, getOrientation, getRandomHorizontalDirection, getType, getWorldPos, getWorldX, getWorldY, getWorldZ, isCloseToChunk, isInterior, isReplaceableByStructures, makeBoundingBox, maybeGenerateBlock, placeBlock, reorient, setGenDepth, setOrientation
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
templateName
-
template
-
placeSettings
-
templatePosition
-
-
Constructor Details
-
TemplateStructurePiece
public TemplateStructurePiece(StructurePieceType pType, int pGenDepth, StructureTemplateManager pStructureTemplateManager, ResourceLocation pLocation, String pTemplateName, StructurePlaceSettings pPlaceSettings, BlockPos pTemplatePosition) -
TemplateStructurePiece
public TemplateStructurePiece(StructurePieceType pType, CompoundTag pTag, StructureTemplateManager pStructureTemplateManager, Function<ResourceLocation, StructurePlaceSettings> pPlaceSettingsFactory)
-
-
Method Details
-
makeTemplateLocation
-
addAdditionalSaveData
- Specified by:
addAdditionalSaveData
in classStructurePiece
-
postProcess
public void postProcess(WorldGenLevel pLevel, StructureManager pStructureManager, ChunkGenerator pGenerator, RandomSource pRandom, BoundingBox pBox, ChunkPos pChunkPos, BlockPos pPos) - Specified by:
postProcess
in classStructurePiece
-
handleDataMarker
protected abstract void handleDataMarker(String pName, BlockPos pPos, ServerLevelAccessor pLevel, RandomSource pRandom, BoundingBox pBox) -
move
Deprecated.- Overrides:
move
in classStructurePiece
-
getRotation
- Overrides:
getRotation
in classStructurePiece
-
template
-
templatePosition
-
placeSettings
-