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 blockInfo, List<StructureTemplate.StructureBlockInfo> normalBlocks, List<StructureTemplate.StructureBlockInfo> blocksWithNbt, List<StructureTemplate.StructureBlockInfo> blocksWithSpecialShape) private static List<StructureTemplate.StructureBlockInfo> buildInfoList(List<StructureTemplate.StructureBlockInfo> normalBlocks, List<StructureTemplate.StructureBlockInfo> blocksWithNbt, List<StructureTemplate.StructureBlockInfo> blocksWithSpecialShape) calculateConnectedPosition(StructurePlaceSettings decorator, BlockPos start, StructurePlaceSettings settings, BlockPos end) static BlockPoscalculateRelativePosition(StructurePlaceSettings decorator, BlockPos pos) createEntityIgnoreException(ProblemReporter problemReporter, ServerLevelAccessor level, CompoundTag tag) private voidfillEntityList(Level level, BlockPos pos1, BlockPos pos2, ProblemReporter problemReporter) voidfillFromWorld(Level level, BlockPos pos, Vec3i size, boolean includeEntities, List<Block> ignoredBlocks) filterBlocks(BlockPos pos, StructurePlaceSettings settings, Block block) it.unimi.dsi.fastutil.objects.ObjectArrayList<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos pos, StructurePlaceSettings settings, Block block, boolean relativePosition) getBoundingBox(BlockPos startPos, Rotation rotation, BlockPos pivotPos, Mirror mirror) protected static BoundingBoxgetBoundingBox(StructurePlaceSettings settings, BlockPos startPos) static JigsawBlockEntity.JointTypegetDefaultJointType(BlockState state) getJigsaws(BlockPos pos, Rotation rotation) static JigsawBlockEntity.JointTypegetJointType(CompoundTag tag, BlockState state) getSize()getZeroPositionWithTransform(BlockPos targetPos, Mirror mirror, Rotation rotation) static BlockPosgetZeroPositionWithTransform(BlockPos pos, Mirror mirror, Rotation rotation, int sizeX, int sizeZ) voidload(HolderGetter<Block> blockGetter, CompoundTag tag) private voidloadPalette(HolderGetter<Block> blockGetter, ListTag paletteTag, ListTag blocksTag) private ListTagnewDoubleList(double... values) private ListTagnewIntegerList(int... values) booleanplaceInWorld(ServerLevelAccessor level, BlockPos offset, BlockPos pos, StructurePlaceSettings settings, RandomSource random, @net.minecraft.world.level.block.Block.UpdateFlags int flags) processBlockInfos(ServerLevelAccessor level, BlockPos offset, BlockPos pos, StructurePlaceSettings settings, List<StructureTemplate.StructureBlockInfo> blockInfos) Deprecated.processBlockInfos(ServerLevelAccessor level, BlockPos offset, BlockPos pos, StructurePlaceSettings settings, List<StructureTemplate.StructureBlockInfo> blockInfos, @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, @net.minecraft.world.level.block.Block.UpdateFlags int flags, DiscreteVoxelShape shape, int startX, int startY, int startZ) static voidupdateShapeAtEdge(LevelAccessor level, @net.minecraft.world.level.block.Block.UpdateFlags int flags, 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 blockInfo, List<StructureTemplate.StructureBlockInfo> normalBlocks, List<StructureTemplate.StructureBlockInfo> blocksWithNbt, List<StructureTemplate.StructureBlockInfo> blocksWithSpecialShape) -
buildInfoList
private static List<StructureTemplate.StructureBlockInfo> buildInfoList(List<StructureTemplate.StructureBlockInfo> normalBlocks, List<StructureTemplate.StructureBlockInfo> blocksWithNbt, List<StructureTemplate.StructureBlockInfo> blocksWithSpecialShape) -
fillEntityList
private void fillEntityList(Level level, BlockPos pos1, BlockPos pos2, ProblemReporter problemReporter) -
filterBlocks
public List<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos pos, StructurePlaceSettings settings, Block block) -
getJigsaws
-
filterBlocks
public it.unimi.dsi.fastutil.objects.ObjectArrayList<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos pos, StructurePlaceSettings settings, Block block, boolean relativePosition) -
calculateConnectedPosition
public BlockPos calculateConnectedPosition(StructurePlaceSettings decorator, BlockPos start, StructurePlaceSettings settings, BlockPos end) -
calculateRelativePosition
-
transformedVec3d
-
placeInWorld
public boolean placeInWorld(ServerLevelAccessor level, BlockPos offset, BlockPos pos, StructurePlaceSettings settings, RandomSource random, @net.minecraft.world.level.block.Block.UpdateFlags int flags) -
updateShapeAtEdge
public static void updateShapeAtEdge(LevelAccessor level, @net.minecraft.world.level.block.Block.UpdateFlags int flags, DiscreteVoxelShape shape, BlockPos pos) -
updateShapeAtEdge
public static void updateShapeAtEdge(LevelAccessor level, @net.minecraft.world.level.block.Block.UpdateFlags int flags, DiscreteVoxelShape shape, int startX, int startY, int startZ) -
processBlockInfos
@Deprecated public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(ServerLevelAccessor level, BlockPos offset, BlockPos pos, StructurePlaceSettings settings, List<StructureTemplate.StructureBlockInfo> blockInfos) Deprecated. -
processBlockInfos
public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(ServerLevelAccessor level, BlockPos offset, BlockPos pos, StructurePlaceSettings settings, List<StructureTemplate.StructureBlockInfo> blockInfos, @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 problemReporter, ServerLevelAccessor level, CompoundTag tag) -
getSize
-
transform
-
transform
-
getZeroPositionWithTransform
-
getZeroPositionWithTransform
-
getBoundingBox
-
getBoundingBox
public BoundingBox getBoundingBox(BlockPos startPos, Rotation rotation, BlockPos pivotPos, Mirror mirror) -
getBoundingBox
-
save
-
load
-
loadPalette
-
newIntegerList
-
newDoubleList
-
getJointType
-
getDefaultJointType
-
processBlockInfos(ServerLevelAccessor, BlockPos, BlockPos, StructurePlaceSettings, List, StructureTemplate)instead.