Class StructureTemplate
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(package private) static class
static final record
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate 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
-
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_) it.unimi.dsi.fastutil.objects.ObjectArrayList
<StructureTemplate.StructureBlockInfo> filterBlocks
(BlockPos p_230336_, StructurePlaceSettings p_230337_, Block p_230338_, boolean p_230339_) 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
(HolderGetter<Block> p_255773_, CompoundTag p_248574_) private void
loadPalette
(HolderGetter<Block> p_256546_, ListTag p_251056_, ListTag p_251493_) private ListTag
newDoubleList
(double... p_74624_) private ListTag
newIntegerList
(int... p_74626_) private void
placeEntities
(ServerLevelAccessor p_74524_, BlockPos p_74525_, Mirror p_74526_, Rotation p_74527_, BoundingBox p_74529_, boolean p_74530_, StructurePlaceSettings placementIn) boolean
placeInWorld
(ServerLevelAccessor p_230329_, BlockPos p_230330_, BlockPos p_230331_, StructurePlaceSettings p_230332_, RandomSource p_230333_, int p_230334_) processBlockInfos
(ServerLevelAccessor p_278297_, BlockPos p_74519_, BlockPos p_74520_, StructurePlaceSettings p_74521_, List<StructureTemplate.StructureBlockInfo> p_74522_) Deprecated.processBlockInfos
(ServerLevelAccessor p_278297_, BlockPos p_74519_, BlockPos p_74520_, StructurePlaceSettings p_74521_, List<StructureTemplate.StructureBlockInfo> p_74522_, StructureTemplate template) processEntityInfos
(StructureTemplate template, LevelAccessor level, BlockPos seedPos, StructurePlaceSettings settings, List<StructureTemplate.StructureEntityInfo> entities) 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_) static void
updateShapeAtEdge
(LevelAccessor p_331910_, int p_330850_, DiscreteVoxelShape p_333161_, BlockPos p_335658_)
-
Field Details
-
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 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 it.unimi.dsi.fastutil.objects.ObjectArrayList<StructureTemplate.StructureBlockInfo> filterBlocks(BlockPos p_230336_, StructurePlaceSettings p_230337_, Block p_230338_, boolean p_230339_) -
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_230329_, BlockPos p_230330_, BlockPos p_230331_, StructurePlaceSettings p_230332_, RandomSource p_230333_, int p_230334_) -
updateShapeAtEdge
public static void updateShapeAtEdge(LevelAccessor p_331910_, int p_330850_, DiscreteVoxelShape p_333161_, BlockPos p_335658_) -
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(ServerLevelAccessor p_278297_, BlockPos p_74519_, BlockPos p_74520_, StructurePlaceSettings p_74521_, List<StructureTemplate.StructureBlockInfo> p_74522_) Deprecated. -
processBlockInfos
public static List<StructureTemplate.StructureBlockInfo> processBlockInfos(ServerLevelAccessor p_278297_, BlockPos p_74519_, BlockPos p_74520_, StructurePlaceSettings p_74521_, List<StructureTemplate.StructureBlockInfo> p_74522_, @Nullable StructureTemplate template) -
addEntitiesToWorld
private void addEntitiesToWorld(ServerLevelAccessor p_74524_, BlockPos p_74525_, StructurePlaceSettings placementIn) -
placeEntities
private void placeEntities(ServerLevelAccessor p_74524_, BlockPos p_74525_, Mirror p_74526_, Rotation p_74527_, @Nullable BoundingBox p_74529_, boolean p_74530_, StructurePlaceSettings placementIn) -
processEntityInfos
public static List<StructureTemplate.StructureEntityInfo> processEntityInfos(@Nullable StructureTemplate template, LevelAccessor level, BlockPos seedPos, StructurePlaceSettings settings, List<StructureTemplate.StructureEntityInfo> entities) -
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
-
processBlockInfos(ServerLevelAccessor, BlockPos, BlockPos, StructurePlaceSettings, List, StructureTemplate)
instead.