类 StructureTemplate
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate
-
嵌套类概要
嵌套类修饰符和类型类说明static final class
(专用程序包) static class
static final record
static class
-
字段概要
字段修饰符和类型字段说明private 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>
static final String
static final String
private final List<StructureTemplate.Palette>
private Vec3i
static final String
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private void
addEntitiesToWorld
(ServerLevelAccessor pServerLevel, BlockPos pPos, StructurePlaceSettings placementIn) 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
(ServerLevelAccessor pLevel, CompoundTag pTag) private void
fillEntityList
(Level pLevel, BlockPos pStartPos, BlockPos pEndPos) void
fillFromWorld
(Level pLevel, BlockPos pPos, Vec3i pSize, boolean pWithEntities, Block pToIgnore) 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 BoundingBox
getBoundingBox
(BlockPos pStartPos, Rotation pRotation, BlockPos pPivotPos, Mirror pMirror, Vec3i pSize) getBoundingBox
(StructurePlaceSettings pSettings, BlockPos pStartPos) 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 pPos, BlockPos p_230331_, StructurePlaceSettings pSettings, RandomSource pRandom, int pFlags) processBlockInfos
(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos p_74520_, StructurePlaceSettings pSettings, List<StructureTemplate.StructureBlockInfo> pBlockInfos) 已过时。processBlockInfos
(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos p_74520_, 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)
-
字段详细资料
-
PALETTE_TAG
- 另请参阅:
-
PALETTE_LIST_TAG
- 另请参阅:
-
ENTITIES_TAG
- 另请参阅:
-
BLOCKS_TAG
- 另请参阅:
-
BLOCK_TAG_POS
- 另请参阅:
-
BLOCK_TAG_STATE
- 另请参阅:
-
BLOCK_TAG_NBT
- 另请参阅:
-
ENTITY_TAG_POS
- 另请参阅:
-
ENTITY_TAG_BLOCKPOS
- 另请参阅:
-
ENTITY_TAG_NBT
- 另请参阅:
-
SIZE_TAG
- 另请参阅:
-
palettes
-
entityInfoList
-
size
-
author
-
-
构造器详细资料
-
StructureTemplate
public StructureTemplate()
-
-
方法详细资料
-
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
-
filterBlocks
public List<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos pPos, StructurePlaceSettings pSettings, Block pBlock) -
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 pPos, BlockPos p_230331_, StructurePlaceSettings pSettings, RandomSource pRandom, int pFlags) -
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 p_74520_, StructurePlaceSettings pSettings, List<StructureTemplate.StructureBlockInfo> pBlockInfos) -
processBlockInfos
public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(ServerLevelAccessor pServerLevel, BlockPos pOffset, BlockPos p_74520_, 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 pServerLevel, BlockPos pPos, StructurePlaceSettings placementIn) -
createEntityIgnoreException
private static Optional<Entity> createEntityIgnoreException(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
-
processBlockInfos(ServerLevelAccessor, BlockPos, BlockPos, StructurePlaceSettings, List, StructureTemplate)
instead.