Class StructureTemplate
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final classprivate 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 level, BlockPos position, StructurePlaceSettings placementIn, ProblemReporter problemReporter) private static voidaddToLists(StructureTemplate.StructureBlockInfo info, List<StructureTemplate.StructureBlockInfo> fullBlockList, List<StructureTemplate.StructureBlockInfo> blockEntitiesList, List<StructureTemplate.StructureBlockInfo> otherBlocksList) private static List<StructureTemplate.StructureBlockInfo> buildInfoList(List<StructureTemplate.StructureBlockInfo> fullBlockList, List<StructureTemplate.StructureBlockInfo> blockEntitiesList, List<StructureTemplate.StructureBlockInfo> otherBlocksList) calculateConnectedPosition(StructurePlaceSettings settings1, BlockPos connection1, StructurePlaceSettings settings2, BlockPos connection2) static BlockPoscalculateRelativePosition(StructurePlaceSettings settings, BlockPos pos) createEntityIgnoreException(ProblemReporter reporter, ServerLevelAccessor level, CompoundTag tag) private voidfillEntityList(Level level, BlockPos minCorner, BlockPos maxCorner, ProblemReporter reporter) voidfillFromWorld(Level level, BlockPos position, Vec3i size, boolean inludeEntities, List<Block> ignoreBlocks) filterBlocks(BlockPos position, StructurePlaceSettings settings, Block block) it.unimi.dsi.fastutil.objects.ObjectArrayList<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos position, StructurePlaceSettings settings, Block block, boolean absolute) getBoundingBox(BlockPos position, Rotation rotation, BlockPos pivot, Mirror mirror) protected static BoundingBoxgetBoundingBox(StructurePlaceSettings settings, BlockPos position) static JigsawBlockEntity.JointTypegetDefaultJointType(BlockState state) getJigsaws(BlockPos position, Rotation rotation) static JigsawBlockEntity.JointTypegetJointType(CompoundTag nbt, BlockState state) getSize()getZeroPositionWithTransform(BlockPos zeroPos, Mirror mirror, Rotation rotation) static BlockPosgetZeroPositionWithTransform(BlockPos zeroPos, Mirror mirror, Rotation rotation, int sizeX, int sizeZ) voidload(HolderGetter<Block> blockLookup, CompoundTag tag) private voidloadPalette(HolderGetter<Block> blockLookup, ListTag paletteList, ListTag blockList) private ListTagnewDoubleList(double... values) private ListTagnewIntegerList(int... values) booleanplaceInWorld(ServerLevelAccessor level, BlockPos position, BlockPos referencePos, StructurePlaceSettings settings, RandomSource random, int updateMode) processBlockInfos(ServerLevelAccessor level, BlockPos position, BlockPos referencePos, StructurePlaceSettings settings, List<StructureTemplate.StructureBlockInfo> blockInfoList) Deprecated.processBlockInfos(ServerLevelAccessor level, BlockPos position, BlockPos referencePos, StructurePlaceSettings settings, List<StructureTemplate.StructureBlockInfo> blockInfoList, @Nullable StructureTemplate template) processEntityInfos(@Nullable StructureTemplate template, LevelAccessor p_215387_0_, BlockPos p_215387_1_, StructurePlaceSettings p_215387_2_, List<StructureTemplate.StructureEntityInfo> p_215387_3_) save(CompoundTag tag) voidstatic BlockPosstatic Vec3static Vec3transformedVec3d(StructurePlaceSettings placementIn, Vec3 pos) static voidupdateShapeAtEdge(LevelAccessor level, int updateMode, DiscreteVoxelShape shape, int startX, int startY, int startZ) static voidupdateShapeAtEdge(LevelAccessor level, int updateMode, DiscreteVoxelShape shape, BlockPos pos)
-
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 info, List<StructureTemplate.StructureBlockInfo> fullBlockList, List<StructureTemplate.StructureBlockInfo> blockEntitiesList, List<StructureTemplate.StructureBlockInfo> otherBlocksList) -
buildInfoList
private static List<StructureTemplate.StructureBlockInfo> buildInfoList(List<StructureTemplate.StructureBlockInfo> fullBlockList, List<StructureTemplate.StructureBlockInfo> blockEntitiesList, List<StructureTemplate.StructureBlockInfo> otherBlocksList) -
fillEntityList
private void fillEntityList(Level level, BlockPos minCorner, BlockPos maxCorner, ProblemReporter reporter) -
filterBlocks
public List<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos position, StructurePlaceSettings settings, Block block) -
getJigsaws
-
filterBlocks
public it.unimi.dsi.fastutil.objects.ObjectArrayList<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos position, StructurePlaceSettings settings, Block block, boolean absolute) -
calculateConnectedPosition
public BlockPos calculateConnectedPosition(StructurePlaceSettings settings1, BlockPos connection1, StructurePlaceSettings settings2, BlockPos connection2) -
calculateRelativePosition
-
transformedVec3d
-
placeInWorld
public boolean placeInWorld(ServerLevelAccessor level, BlockPos position, BlockPos referencePos, StructurePlaceSettings settings, RandomSource random, int updateMode) -
updateShapeAtEdge
public static void updateShapeAtEdge(LevelAccessor level, int updateMode, DiscreteVoxelShape shape, BlockPos pos) -
updateShapeAtEdge
public static void updateShapeAtEdge(LevelAccessor level, int updateMode, DiscreteVoxelShape shape, int startX, int startY, int startZ) -
processBlockInfos
@Deprecated public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(ServerLevelAccessor level, BlockPos position, BlockPos referencePos, StructurePlaceSettings settings, List<StructureTemplate.StructureBlockInfo> blockInfoList) Deprecated. -
processBlockInfos
public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(ServerLevelAccessor level, BlockPos position, BlockPos referencePos, StructurePlaceSettings settings, List<StructureTemplate.StructureBlockInfo> blockInfoList, @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 level, BlockPos position, StructurePlaceSettings placementIn, ProblemReporter problemReporter) -
createEntityIgnoreException
private static Optional<Entity> createEntityIgnoreException(ProblemReporter reporter, ServerLevelAccessor level, CompoundTag tag) -
getSize
-
transform
-
transform
-
getZeroPositionWithTransform
-
getZeroPositionWithTransform
-
getBoundingBox
-
getBoundingBox
public BoundingBox getBoundingBox(BlockPos position, Rotation rotation, BlockPos pivot, Mirror mirror) -
getBoundingBox
-
save
-
load
-
loadPalette
-
newIntegerList
-
newDoubleList
-
getJointType
-
getDefaultJointType
-
processBlockInfos(ServerLevelAccessor, BlockPos, BlockPos, StructurePlaceSettings, List, StructureTemplate)instead.