Class StructureTemplate
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final class(package private) static classstatic final recordstatic class - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate final List<StructureTemplate.StructureEntityInfo> private static final org.slf4j.Loggerstatic final Stringstatic final Stringprivate final List<StructureTemplate.Palette> private Vec3istatic final String - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddEntitiesToWorld(ServerLevelAccessor p_74524_, BlockPos p_74525_, StructurePlaceSettings placementIn, ProblemReporter p_421857_) private static voidaddToLists(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 BlockPoscalculateRelativePosition(StructurePlaceSettings pDecorator, BlockPos pPos) createEntityIgnoreException(ProblemReporter pProblemReporter, ServerLevelAccessor pLevel, CompoundTag pTag) private voidfillEntityList(Level pLevel, BlockPos pPos1, BlockPos pPos2, ProblemReporter pProblemReporter) voidfillFromWorld(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 pPos, StructurePlaceSettings pSettings, Block pBlock, boolean pRelativePosition) getBoundingBox(BlockPos pStartPos, Rotation pRotation, BlockPos pPivotPos, Mirror pMirror) protected static BoundingBoxgetBoundingBox(BlockPos pStartPos, Rotation pRotation, BlockPos pPivotPos, Mirror pMirror, Vec3i pSize) getBoundingBox(StructurePlaceSettings pSettings, BlockPos pStartPos) static JigsawBlockEntity.JointTypegetDefaultJointType(BlockState pState) getJigsaws(BlockPos pPos, Rotation pRotation) static JigsawBlockEntity.JointTypegetJointType(CompoundTag pTag, BlockState pState) getSize()getZeroPositionWithTransform(BlockPos pTargetPos, Mirror pMirror, Rotation pRotation) static BlockPosgetZeroPositionWithTransform(BlockPos pPos, Mirror pMirror, Rotation pRotation, int pSizeX, int pSizeZ) voidload(HolderGetter<Block> pBlockGetter, CompoundTag pTag) private voidloadPalette(HolderGetter<Block> pBlockGetter, ListTag pPaletteTag, ListTag pBlocksTag) private ListTagnewDoubleList(double... pValues) private ListTagnewIntegerList(int... pValues) booleanplaceInWorld(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) voidstatic BlockPosstatic Vec3static Vec3transformedVec3d(StructurePlaceSettings placementIn, Vec3 pos) static voidupdateShapeAtEdge(LevelAccessor pLevel, int pFlags, DiscreteVoxelShape pShape, int pX, int pY, int pZ) static voidupdateShapeAtEdge(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 pPos, StructurePlaceSettings pSettings, Block pBlock, boolean pRelativePosition)  - 
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.