Class StructurePoolElement
java.lang.Object
net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement
- Direct Known Subclasses:
EmptyPoolElement, FeaturePoolElement, ListPoolElement, SinglePoolElement
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StructurePoolElement> private static final Holder<StructureProcessorList> private @Nullable StructureTemplatePool.Projection -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStructurePoolElement(StructureTemplatePool.Projection projection) -
Method Summary
Modifier and TypeMethodDescriptionempty()feature(Holder<PlacedFeature> feature) abstract BoundingBoxgetBoundingBox(StructureTemplateManager structureTemplateManager, BlockPos position, Rotation rotation) intabstract List<StructureTemplate.JigsawBlockInfo> getShuffledJigsawBlocks(StructureTemplateManager structureTemplateManager, BlockPos position, Rotation rotation, RandomSource random) abstract Vec3igetSize(StructureTemplateManager structureTemplateManager, Rotation rotation) abstract StructurePoolElementType<?> getType()voidhandleDataMarker(LevelAccessor level, StructureTemplate.StructureBlockInfo dataMarker, BlockPos position, Rotation rotation, RandomSource random, BoundingBox chunkBB) legacy(String location, Holder<StructureProcessorList> processors) list(List<Function<StructureTemplatePool.Projection, ? extends StructurePoolElement>> elements) abstract booleanplace(StructureTemplateManager structureTemplateManager, WorldGenLevel level, StructureManager structureManager, ChunkGenerator generator, BlockPos position, BlockPos referencePos, Rotation rotation, BoundingBox chunkBB, RandomSource random, LiquidSettings liquidSettings, boolean keepJigsaws) protected static <E extends StructurePoolElement>
com.mojang.serialization.codecs.RecordCodecBuilder<E, StructureTemplatePool.Projection> setProjection(StructureTemplatePool.Projection projection) single(String location, Holder<StructureProcessorList> processors) single(String location, Holder<StructureProcessorList> processors, LiquidSettings overrideLiquidSettings) single(String location, LiquidSettings overrideLiquidSettings)
-
Field Details
-
CODEC
-
EMPTY
-
projection
-
-
Constructor Details
-
StructurePoolElement
-
-
Method Details
-
projectionCodec
protected static <E extends StructurePoolElement> com.mojang.serialization.codecs.RecordCodecBuilder<E, StructureTemplatePool.Projection> projectionCodec() -
getSize
-
getShuffledJigsawBlocks
public abstract List<StructureTemplate.JigsawBlockInfo> getShuffledJigsawBlocks(StructureTemplateManager structureTemplateManager, BlockPos position, Rotation rotation, RandomSource random) -
getBoundingBox
public abstract BoundingBox getBoundingBox(StructureTemplateManager structureTemplateManager, BlockPos position, Rotation rotation) -
place
public abstract boolean place(StructureTemplateManager structureTemplateManager, WorldGenLevel level, StructureManager structureManager, ChunkGenerator generator, BlockPos position, BlockPos referencePos, Rotation rotation, BoundingBox chunkBB, RandomSource random, LiquidSettings liquidSettings, boolean keepJigsaws) -
getType
-
handleDataMarker
public void handleDataMarker(LevelAccessor level, StructureTemplate.StructureBlockInfo dataMarker, BlockPos position, Rotation rotation, RandomSource random, BoundingBox chunkBB) -
setProjection
-
getProjection
-
getGroundLevelDelta
public int getGroundLevelDelta() -
empty
-
legacy
public static Function<StructureTemplatePool.Projection, LegacySinglePoolElement> legacy(String location) -
legacy
public static Function<StructureTemplatePool.Projection, LegacySinglePoolElement> legacy(String location, Holder<StructureProcessorList> processors) -
single
-
single
public static Function<StructureTemplatePool.Projection, SinglePoolElement> single(String location, Holder<StructureProcessorList> processors) -
single
public static Function<StructureTemplatePool.Projection, SinglePoolElement> single(String location, LiquidSettings overrideLiquidSettings) -
single
public static Function<StructureTemplatePool.Projection, SinglePoolElement> single(String location, Holder<StructureProcessorList> processors, LiquidSettings overrideLiquidSettings) -
feature
public static Function<StructureTemplatePool.Projection, FeaturePoolElement> feature(Holder<PlacedFeature> feature) -
list
public static Function<StructureTemplatePool.Projection, ListPoolElement> list(List<Function<StructureTemplatePool.Projection, ? extends StructurePoolElement>> elements)
-