Class StructureTemplate
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
(package private) static class
static class
static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addEntitiesToWorld(ServerLevelAccessor p_74524_, BlockPos p_74525_, StructurePlaceSettings placementIn)
private static void
addToLists(StructureTemplate.StructureBlockInfo p_74574_, List<StructureTemplate.StructureBlockInfo> p_74575_, List<StructureTemplate.StructureBlockInfo> p_74576_, List<StructureTemplate.StructureBlockInfo> p_74577_)
private static List<StructureTemplate.StructureBlockInfo>
buildInfoList(List<StructureTemplate.StructureBlockInfo> p_74615_, List<StructureTemplate.StructureBlockInfo> p_74616_, List<StructureTemplate.StructureBlockInfo> p_74617_)
calculateConnectedPosition(StructurePlaceSettings p_74567_, BlockPos p_74568_, StructurePlaceSettings p_74569_, BlockPos p_74570_)
static BlockPos
calculateRelativePosition(StructurePlaceSettings p_74564_, BlockPos p_74565_)
createEntityIgnoreException(ServerLevelAccessor p_74544_, CompoundTag p_74545_)
private void
fillEntityList(Level p_74501_, BlockPos p_74502_, BlockPos p_74503_)
void
fillFromWorld(Level p_163803_, BlockPos p_163804_, Vec3i p_163805_, boolean p_163806_, Block p_163807_)
filterBlocks(BlockPos p_74604_, StructurePlaceSettings p_74605_, Block p_74606_)
filterBlocks(BlockPos p_74608_, StructurePlaceSettings p_74609_, Block p_74610_, boolean p_74611_)
getBoundingBox(BlockPos p_74599_, Rotation p_74600_, BlockPos p_74601_, Mirror p_74602_)
protected static BoundingBox
getBoundingBox(BlockPos p_163811_, Rotation p_163812_, BlockPos p_163813_, Mirror p_163814_, Vec3i p_163815_)
getBoundingBox(StructurePlaceSettings p_74634_, BlockPos p_74635_)
getSize()
getZeroPositionWithTransform(BlockPos p_74584_, Mirror p_74585_, Rotation p_74586_)
static BlockPos
getZeroPositionWithTransform(BlockPos p_74588_, Mirror p_74589_, Rotation p_74590_, int p_74591_, int p_74592_)
void
load(CompoundTag p_74639_)
private void
loadPalette(ListTag p_74621_, ListTag p_74622_)
private ListTag
newDoubleList(double... p_74624_)
private ListTag
newIntegerList(int... p_74626_)
boolean
placeInWorld(ServerLevelAccessor p_74537_, BlockPos p_74538_, BlockPos p_74539_, StructurePlaceSettings p_74540_, Random p_74541_, int p_74542_)
processBlockInfos(LevelAccessor p_74518_, BlockPos p_74519_, BlockPos p_74520_, StructurePlaceSettings p_74521_, List<StructureTemplate.StructureBlockInfo> p_74522_)
Deprecated.processBlockInfos(LevelAccessor p_74518_, BlockPos p_74519_, BlockPos p_74520_, StructurePlaceSettings p_74521_, List<StructureTemplate.StructureBlockInfo> p_74522_, 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 p_74619_)
void
static BlockPos
static Vec3
static Vec3
transformedVec3d(StructurePlaceSettings placementIn, Vec3 pos)
static void
updateShapeAtEdge(LevelAccessor p_74511_, int p_74512_, DiscreteVoxelShape p_74513_, int p_74514_, int p_74515_, int p_74516_)
-
Field Details
-
PALETTE_TAG
- See Also:
- Constant Field Values
-
PALETTE_LIST_TAG
- See Also:
- Constant Field Values
-
ENTITIES_TAG
- See Also:
- Constant Field Values
-
BLOCKS_TAG
- See Also:
- Constant Field Values
-
BLOCK_TAG_POS
- See Also:
- Constant Field Values
-
BLOCK_TAG_STATE
- See Also:
- Constant Field Values
-
BLOCK_TAG_NBT
- See Also:
- Constant Field Values
-
ENTITY_TAG_POS
- See Also:
- Constant Field Values
-
ENTITY_TAG_BLOCKPOS
- See Also:
- Constant Field Values
-
ENTITY_TAG_NBT
- See Also:
- Constant Field Values
-
SIZE_TAG
- See Also:
- Constant Field Values
-
CHUNK_SIZE
static final int CHUNK_SIZE- See Also:
- Constant Field Values
-
palettes
-
entityInfoList
-
size
-
author
-
-
Constructor Details
-
StructureTemplate
public StructureTemplate()
-
-
Method Details
-
getSize
-
setAuthor
-
getAuthor
-
fillFromWorld
-
addToLists
private static void addToLists(StructureTemplate.StructureBlockInfo p_74574_, List<StructureTemplate.StructureBlockInfo> p_74575_, List<StructureTemplate.StructureBlockInfo> p_74576_, List<StructureTemplate.StructureBlockInfo> p_74577_) -
buildInfoList
private static List<StructureTemplate.StructureBlockInfo> buildInfoList(List<StructureTemplate.StructureBlockInfo> p_74615_, List<StructureTemplate.StructureBlockInfo> p_74616_, List<StructureTemplate.StructureBlockInfo> p_74617_) -
fillEntityList
-
filterBlocks
public List<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos p_74604_, StructurePlaceSettings p_74605_, Block p_74606_) -
filterBlocks
public List<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos p_74608_, StructurePlaceSettings p_74609_, Block p_74610_, boolean p_74611_) -
calculateConnectedPosition
public BlockPos calculateConnectedPosition(StructurePlaceSettings p_74567_, BlockPos p_74568_, StructurePlaceSettings p_74569_, BlockPos p_74570_) -
calculateRelativePosition
public static BlockPos calculateRelativePosition(StructurePlaceSettings p_74564_, BlockPos p_74565_) -
transformedVec3d
-
placeInWorld
public boolean placeInWorld(ServerLevelAccessor p_74537_, BlockPos p_74538_, BlockPos p_74539_, StructurePlaceSettings p_74540_, Random p_74541_, int p_74542_) -
updateShapeAtEdge
public static void updateShapeAtEdge(LevelAccessor p_74511_, int p_74512_, DiscreteVoxelShape p_74513_, int p_74514_, int p_74515_, int p_74516_) -
processBlockInfos
@Deprecated public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(LevelAccessor p_74518_, BlockPos p_74519_, BlockPos p_74520_, StructurePlaceSettings p_74521_, List<StructureTemplate.StructureBlockInfo> p_74522_)Deprecated. -
processBlockInfos
public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(LevelAccessor p_74518_, BlockPos p_74519_, BlockPos p_74520_, StructurePlaceSettings p_74521_, List<StructureTemplate.StructureBlockInfo> p_74522_, @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) -
createEntityIgnoreException
private static Optional<Entity> createEntityIgnoreException(ServerLevelAccessor p_74544_, CompoundTag p_74545_) -
getSize
-
transform
-
transform
-
getZeroPositionWithTransform
-
getZeroPositionWithTransform
-
getBoundingBox
-
getBoundingBox
public BoundingBox getBoundingBox(BlockPos p_74599_, Rotation p_74600_, BlockPos p_74601_, Mirror p_74602_) -
getBoundingBox
-
save
-
load
-
loadPalette
-
newIntegerList
-
newDoubleList
-