Class SinglePoolElement
java.lang.Object
net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement
net.minecraft.world.level.levelgen.structure.pools.SinglePoolElement
- Direct Known Subclasses:
LegacySinglePoolElement
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<SinglePoolElement> protected final Optional
<LiquidSettings> protected final Holder
<StructureProcessorList> protected final com.mojang.datafixers.util.Either
<ResourceLocation, StructureTemplate> private static final com.mojang.serialization.Codec
<com.mojang.datafixers.util.Either<ResourceLocation, StructureTemplate>> -
Constructor Summary
ModifierConstructorDescriptionprotected
SinglePoolElement
(com.mojang.datafixers.util.Either<ResourceLocation, StructureTemplate> p_210415_, Holder<StructureProcessorList> p_210416_, StructureTemplatePool.Projection p_210417_, Optional<LiquidSettings> p_352236_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> com.mojang.serialization.DataResult
<T> encodeTemplate
(com.mojang.datafixers.util.Either<ResourceLocation, StructureTemplate> p_210425_, com.mojang.serialization.DynamicOps<T> p_210426_, T p_210427_) getBoundingBox
(StructureTemplateManager p_227316_, BlockPos p_227317_, Rotation p_227318_) getDataMarkers
(StructureTemplateManager p_227325_, BlockPos p_227326_, Rotation p_227327_, boolean p_227328_) protected StructurePlaceSettings
getSettings
(Rotation p_210421_, BoundingBox p_210422_, LiquidSettings p_352322_, boolean p_210423_) getShuffledJigsawBlocks
(StructureTemplateManager p_227320_, BlockPos p_227321_, Rotation p_227322_, RandomSource p_227323_) getSize
(StructureTemplateManager p_227313_, Rotation p_227314_) private StructureTemplate
getTemplate
(StructureTemplateManager p_227300_) getType()
protected static <E extends SinglePoolElement>
com.mojang.serialization.codecs.RecordCodecBuilder<E, Optional<LiquidSettings>> boolean
place
(StructureTemplateManager p_227302_, WorldGenLevel p_227303_, StructureManager p_227304_, ChunkGenerator p_227305_, BlockPos p_227306_, BlockPos p_227307_, Rotation p_227308_, BoundingBox p_227309_, RandomSource p_227310_, LiquidSettings p_352088_, boolean p_227311_) protected static <E extends SinglePoolElement>
com.mojang.serialization.codecs.RecordCodecBuilder<E, Holder<StructureProcessorList>> (package private) static void
protected static <E extends SinglePoolElement>
com.mojang.serialization.codecs.RecordCodecBuilder<E, com.mojang.datafixers.util.Either<ResourceLocation, StructureTemplate>> toString()
Methods inherited from class net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement
empty, feature, getGroundLevelDelta, getProjection, handleDataMarker, legacy, legacy, list, projectionCodec, setProjection, single, single, single, single
-
Field Details
-
TEMPLATE_CODEC
private static final com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<ResourceLocation,StructureTemplate>> TEMPLATE_CODEC -
CODEC
-
template
-
processors
-
overrideLiquidSettings
-
-
Constructor Details
-
SinglePoolElement
protected SinglePoolElement(com.mojang.datafixers.util.Either<ResourceLocation, StructureTemplate> p_210415_, Holder<StructureProcessorList> p_210416_, StructureTemplatePool.Projection p_210417_, Optional<LiquidSettings> p_352236_)
-
-
Method Details
-
encodeTemplate
private static <T> com.mojang.serialization.DataResult<T> encodeTemplate(com.mojang.datafixers.util.Either<ResourceLocation, StructureTemplate> p_210425_, com.mojang.serialization.DynamicOps<T> p_210426_, T p_210427_) -
processorsCodec
protected static <E extends SinglePoolElement> com.mojang.serialization.codecs.RecordCodecBuilder<E,Holder<StructureProcessorList>> processorsCodec() -
overrideLiquidSettingsCodec
protected static <E extends SinglePoolElement> com.mojang.serialization.codecs.RecordCodecBuilder<E,Optional<LiquidSettings>> overrideLiquidSettingsCodec() -
templateCodec
protected static <E extends SinglePoolElement> com.mojang.serialization.codecs.RecordCodecBuilder<E,com.mojang.datafixers.util.Either<ResourceLocation, templateCodec()StructureTemplate>> -
getSize
- Specified by:
getSize
in classStructurePoolElement
-
getTemplate
-
getDataMarkers
public List<StructureTemplate.StructureBlockInfo> getDataMarkers(StructureTemplateManager p_227325_, BlockPos p_227326_, Rotation p_227327_, boolean p_227328_) -
getShuffledJigsawBlocks
public List<StructureTemplate.StructureBlockInfo> getShuffledJigsawBlocks(StructureTemplateManager p_227320_, BlockPos p_227321_, Rotation p_227322_, RandomSource p_227323_) - Specified by:
getShuffledJigsawBlocks
in classStructurePoolElement
-
sortBySelectionPriority
-
getBoundingBox
public BoundingBox getBoundingBox(StructureTemplateManager p_227316_, BlockPos p_227317_, Rotation p_227318_) - Specified by:
getBoundingBox
in classStructurePoolElement
-
place
public boolean place(StructureTemplateManager p_227302_, WorldGenLevel p_227303_, StructureManager p_227304_, ChunkGenerator p_227305_, BlockPos p_227306_, BlockPos p_227307_, Rotation p_227308_, BoundingBox p_227309_, RandomSource p_227310_, LiquidSettings p_352088_, boolean p_227311_) - Specified by:
place
in classStructurePoolElement
-
getSettings
protected StructurePlaceSettings getSettings(Rotation p_210421_, BoundingBox p_210422_, LiquidSettings p_352322_, boolean p_210423_) -
getType
- Specified by:
getType
in classStructurePoolElement
-
toString
-