Class StructureTemplate
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final class
(package private) static class
static final record
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
private final List
<StructureTemplate.StructureEntityInfo> private static final org.slf4j.Logger
static final String
static final String
private final List
<StructureTemplate.Palette> private Vec3i
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addEntitiesToWorld
(ServerLevelAccessor p_74524_, BlockPos p_74525_, StructurePlaceSettings placementIn, ProblemReporter p_421857_) private static void
addToLists
(StructureTemplate.StructureBlockInfo pBlockInfo, List<StructureTemplate.StructureBlockInfo> pNormalBlocks, List<StructureTemplate.StructureBlockInfo> pBlocksWithNbt, List<StructureTemplate.StructureBlockInfo> pBlocksWithSpecialShape) private static List
<StructureTemplate.StructureBlockInfo> buildInfoList
(List<StructureTemplate.StructureBlockInfo> pNormalBlocks, List<StructureTemplate.StructureBlockInfo> pBlocksWithNbt, List<StructureTemplate.StructureBlockInfo> pBlocksWithSpecialShape) calculateConnectedPosition
(StructurePlaceSettings pDecorator, BlockPos pStart, StructurePlaceSettings pSettings, BlockPos pEnd) static BlockPos
calculateRelativePosition
(StructurePlaceSettings pDecorator, BlockPos pPos) createEntityIgnoreException
(ProblemReporter pProblemReporter, ServerLevelAccessor pLevel, CompoundTag pTag) private void
fillEntityList
(Level pLevel, BlockPos pPos1, BlockPos pPos2, ProblemReporter pProblemReporter) void
fillFromWorld
(Level pLevel, BlockPos pPos, Vec3i pSize, boolean pIncludeEntities, List<Block> pIgnoredBlocks) filterBlocks
(BlockPos pPos, StructurePlaceSettings pSettings, Block pBlock) it.unimi.dsi.fastutil.objects.ObjectArrayList
<StructureTemplate.StructureBlockInfo> filterBlocks
(BlockPos p_230336_, StructurePlaceSettings p_230337_, Block p_230338_, boolean p_230339_) getBoundingBox
(BlockPos pStartPos, Rotation pRotation, BlockPos pPivotPos, Mirror pMirror) protected static BoundingBox
getBoundingBox
(BlockPos pStartPos, Rotation pRotation, BlockPos pPivotPos, Mirror pMirror, Vec3i pSize) getBoundingBox
(StructurePlaceSettings pSettings, BlockPos pStartPos) static JigsawBlockEntity.JointType
getDefaultJointType
(BlockState pState) getJigsaws
(BlockPos pPos, Rotation pRotation) static JigsawBlockEntity.JointType
getJointType
(CompoundTag pTag, BlockState pState) getSize()
getZeroPositionWithTransform
(BlockPos pTargetPos, Mirror pMirror, Rotation pRotation) static BlockPos
getZeroPositionWithTransform
(BlockPos pPos, Mirror pMirror, Rotation pRotation, int pSizeX, int pSizeZ) void
load
(HolderGetter<Block> pBlockGetter, CompoundTag pTag) private void
loadPalette
(HolderGetter<Block> pBlockGetter, ListTag pPaletteTag, ListTag pBlocksTag) private ListTag
newDoubleList
(double... pValues) private ListTag
newIntegerList
(int... pValues) boolean
placeInWorld
(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos pPos, StructurePlaceSettings pSettings, RandomSource pRandom, int pFlags) processBlockInfos
(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos pPos, StructurePlaceSettings pSettings, List<StructureTemplate.StructureBlockInfo> pBlockInfos) Deprecated.processBlockInfos
(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos pPos, StructurePlaceSettings pSettings, List<StructureTemplate.StructureBlockInfo> pBlockInfos, StructureTemplate template) processEntityInfos
(StructureTemplate template, LevelAccessor p_215387_0_, BlockPos p_215387_1_, StructurePlaceSettings p_215387_2_, List<StructureTemplate.StructureEntityInfo> p_215387_3_) save
(CompoundTag pTag) void
static BlockPos
static Vec3
static Vec3
transformedVec3d
(StructurePlaceSettings placementIn, Vec3 pos) static void
updateShapeAtEdge
(LevelAccessor pLevel, int pFlags, DiscreteVoxelShape pShape, int pX, int pY, int pZ) static void
updateShapeAtEdge
(LevelAccessor pLevel, int pFlags, DiscreteVoxelShape pShape, BlockPos pPos)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
PALETTE_TAG
- See Also:
-
PALETTE_LIST_TAG
- See Also:
-
ENTITIES_TAG
- See Also:
-
BLOCKS_TAG
- See Also:
-
BLOCK_TAG_POS
- See Also:
-
BLOCK_TAG_STATE
- See Also:
-
BLOCK_TAG_NBT
- See Also:
-
ENTITY_TAG_POS
- See Also:
-
ENTITY_TAG_BLOCKPOS
- See Also:
-
ENTITY_TAG_NBT
- See Also:
-
SIZE_TAG
- See Also:
-
palettes
-
entityInfoList
-
size
-
author
-
-
Constructor Details
-
StructureTemplate
public StructureTemplate()
-
-
Method Details
-
getSize
-
setAuthor
-
getAuthor
-
fillFromWorld
-
addToLists
private static void addToLists(StructureTemplate.StructureBlockInfo pBlockInfo, List<StructureTemplate.StructureBlockInfo> pNormalBlocks, List<StructureTemplate.StructureBlockInfo> pBlocksWithNbt, List<StructureTemplate.StructureBlockInfo> pBlocksWithSpecialShape) -
buildInfoList
private static List<StructureTemplate.StructureBlockInfo> buildInfoList(List<StructureTemplate.StructureBlockInfo> pNormalBlocks, List<StructureTemplate.StructureBlockInfo> pBlocksWithNbt, List<StructureTemplate.StructureBlockInfo> pBlocksWithSpecialShape) -
fillEntityList
private void fillEntityList(Level pLevel, BlockPos pPos1, BlockPos pPos2, ProblemReporter pProblemReporter) -
filterBlocks
public List<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos pPos, StructurePlaceSettings pSettings, Block pBlock) -
getJigsaws
-
filterBlocks
public it.unimi.dsi.fastutil.objects.ObjectArrayList<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos p_230336_, StructurePlaceSettings p_230337_, Block p_230338_, boolean p_230339_) -
calculateConnectedPosition
public BlockPos calculateConnectedPosition(StructurePlaceSettings pDecorator, BlockPos pStart, StructurePlaceSettings pSettings, BlockPos pEnd) -
calculateRelativePosition
-
transformedVec3d
-
placeInWorld
public boolean placeInWorld(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos pPos, StructurePlaceSettings pSettings, RandomSource pRandom, int pFlags) -
updateShapeAtEdge
public static void updateShapeAtEdge(LevelAccessor pLevel, int pFlags, DiscreteVoxelShape pShape, BlockPos pPos) -
updateShapeAtEdge
public static void updateShapeAtEdge(LevelAccessor pLevel, int pFlags, DiscreteVoxelShape pShape, int pX, int pY, int pZ) -
processBlockInfos
@Deprecated public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos pPos, StructurePlaceSettings pSettings, List<StructureTemplate.StructureBlockInfo> pBlockInfos) Deprecated. -
processBlockInfos
public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos pPos, StructurePlaceSettings pSettings, List<StructureTemplate.StructureBlockInfo> pBlockInfos, @Nullable StructureTemplate template) -
processEntityInfos
public static List<StructureTemplate.StructureEntityInfo> processEntityInfos(@Nullable StructureTemplate template, LevelAccessor p_215387_0_, BlockPos p_215387_1_, StructurePlaceSettings p_215387_2_, List<StructureTemplate.StructureEntityInfo> p_215387_3_) -
addEntitiesToWorld
private void addEntitiesToWorld(ServerLevelAccessor p_74524_, BlockPos p_74525_, StructurePlaceSettings placementIn, ProblemReporter p_421857_) -
createEntityIgnoreException
private static Optional<Entity> createEntityIgnoreException(ProblemReporter pProblemReporter, ServerLevelAccessor pLevel, CompoundTag pTag) -
getSize
-
transform
-
transform
-
getZeroPositionWithTransform
-
getZeroPositionWithTransform
-
getBoundingBox
-
getBoundingBox
public BoundingBox getBoundingBox(BlockPos pStartPos, Rotation pRotation, BlockPos pPivotPos, Mirror pMirror) -
getBoundingBox
-
save
-
load
-
loadPalette
-
newIntegerList
-
newDoubleList
-
getJointType
-
getDefaultJointType
-
processBlockInfos(ServerLevelAccessor, BlockPos, BlockPos, StructurePlaceSettings, List, StructureTemplate)
instead.