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 type, int genDepth, StructureTemplateManager structureTemplateManager, ResourceLocation location, String templateName, StructurePlaceSettings placeSettings, BlockPos templatePosition) TemplateStructurePiece
(StructurePieceType type, CompoundTag tag, StructureTemplateManager structureTemplateManager, Function<ResourceLocation, StructurePlaceSettings> placeSettingsFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected abstract void
handleDataMarker
(String name, BlockPos pos, ServerLevelAccessor level, RandomSource random, BoundingBox box) protected ResourceLocation
void
move
(int x, int y, int z) Deprecated.void
postProcess
(WorldGenLevel level, StructureManager structureManager, ChunkGenerator generator, RandomSource random, BoundingBox box, ChunkPos chunkPos, BlockPos pos) 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 type, int genDepth, StructureTemplateManager structureTemplateManager, ResourceLocation location, String templateName, StructurePlaceSettings placeSettings, BlockPos templatePosition) -
TemplateStructurePiece
public TemplateStructurePiece(StructurePieceType type, CompoundTag tag, StructureTemplateManager structureTemplateManager, Function<ResourceLocation, StructurePlaceSettings> placeSettingsFactory)
-
-
Method Details
-
makeTemplateLocation
-
addAdditionalSaveData
- Specified by:
addAdditionalSaveData
in classStructurePiece
-
postProcess
public void postProcess(WorldGenLevel level, StructureManager structureManager, ChunkGenerator generator, RandomSource random, BoundingBox box, ChunkPos chunkPos, BlockPos pos) - Specified by:
postProcess
in classStructurePiece
-
handleDataMarker
protected abstract void handleDataMarker(String name, BlockPos pos, ServerLevelAccessor level, RandomSource random, BoundingBox box) -
move
Deprecated.- Overrides:
move
in classStructurePiece
-
getRotation
- Overrides:
getRotation
in classStructurePiece
-
template
-
templatePosition
-
placeSettings
-