Class SingleJigsawPiece
- java.lang.Object
-
- net.minecraft.world.gen.feature.jigsaw.JigsawPiece
-
- net.minecraft.world.gen.feature.jigsaw.SingleJigsawPiece
-
- Direct Known Subclasses:
LegacySingleJigsawPiece
public class SingleJigsawPiece extends JigsawPiece
-
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<SingleJigsawPiece>
CODEC
protected java.util.function.Supplier<StructureProcessorList>
processors
protected com.mojang.datafixers.util.Either<ResourceLocation,Template>
template
private static com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<ResourceLocation,Template>>
TEMPLATE_CODEC
-
Constructor Summary
Constructors Modifier Constructor Description protected
SingleJigsawPiece(com.mojang.datafixers.util.Either<ResourceLocation,Template> p_i242008_1_, java.util.function.Supplier<StructureProcessorList> p_i242008_2_, JigsawPattern.PlacementBehaviour p_i242008_3_)
SingleJigsawPiece(Template p_i242009_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> com.mojang.serialization.DataResult<T>
encodeTemplate(com.mojang.datafixers.util.Either<ResourceLocation,Template> p_236840_0_, com.mojang.serialization.DynamicOps<T> p_236840_1_, T p_236840_2_)
MutableBoundingBox
getBoundingBox(TemplateManager p_214852_1_, BlockPos p_214852_2_, Rotation p_214852_3_)
java.util.List<Template.BlockInfo>
getDataMarkers(TemplateManager p_214857_1_, BlockPos p_214857_2_, Rotation p_214857_3_, boolean p_214857_4_)
protected PlacementSettings
getSettings(Rotation p_230379_1_, MutableBoundingBox p_230379_2_, boolean p_230379_3_)
java.util.List<Template.BlockInfo>
getShuffledJigsawBlocks(TemplateManager p_214849_1_, BlockPos p_214849_2_, Rotation p_214849_3_, java.util.Random p_214849_4_)
private Template
getTemplate(TemplateManager p_236843_1_)
IJigsawDeserializer<?>
getType()
boolean
place(TemplateManager p_230378_1_, ISeedReader p_230378_2_, StructureManager p_230378_3_, ChunkGenerator p_230378_4_, BlockPos p_230378_5_, BlockPos p_230378_6_, Rotation p_230378_7_, MutableBoundingBox p_230378_8_, java.util.Random p_230378_9_, boolean p_230378_10_)
protected static <E extends SingleJigsawPiece>
com.mojang.serialization.codecs.RecordCodecBuilder<E,java.util.function.Supplier<StructureProcessorList>>processorsCodec()
protected static <E extends SingleJigsawPiece>
com.mojang.serialization.codecs.RecordCodecBuilder<E,com.mojang.datafixers.util.Either<ResourceLocation,Template>>templateCodec()
java.lang.String
toString()
-
Methods inherited from class net.minecraft.world.gen.feature.jigsaw.JigsawPiece
empty, feature, getGroundLevelDelta, getProjection, handleDataMarker, legacy, legacy, list, projectionCodec, setProjection, single, single
-
-
-
-
Field Detail
-
TEMPLATE_CODEC
private static final com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<ResourceLocation,Template>> TEMPLATE_CODEC
-
CODEC
public static final com.mojang.serialization.Codec<SingleJigsawPiece> CODEC
-
template
protected final com.mojang.datafixers.util.Either<ResourceLocation,Template> template
-
processors
protected final java.util.function.Supplier<StructureProcessorList> processors
-
-
Constructor Detail
-
SingleJigsawPiece
protected SingleJigsawPiece(com.mojang.datafixers.util.Either<ResourceLocation,Template> p_i242008_1_, java.util.function.Supplier<StructureProcessorList> p_i242008_2_, JigsawPattern.PlacementBehaviour p_i242008_3_)
-
SingleJigsawPiece
public SingleJigsawPiece(Template p_i242009_1_)
-
-
Method Detail
-
encodeTemplate
private static <T> com.mojang.serialization.DataResult<T> encodeTemplate(com.mojang.datafixers.util.Either<ResourceLocation,Template> p_236840_0_, com.mojang.serialization.DynamicOps<T> p_236840_1_, T p_236840_2_)
-
processorsCodec
protected static <E extends SingleJigsawPiece> com.mojang.serialization.codecs.RecordCodecBuilder<E,java.util.function.Supplier<StructureProcessorList>> processorsCodec()
-
templateCodec
protected static <E extends SingleJigsawPiece> com.mojang.serialization.codecs.RecordCodecBuilder<E,com.mojang.datafixers.util.Either<ResourceLocation,Template>> templateCodec()
-
getTemplate
private Template getTemplate(TemplateManager p_236843_1_)
-
getDataMarkers
public java.util.List<Template.BlockInfo> getDataMarkers(TemplateManager p_214857_1_, BlockPos p_214857_2_, Rotation p_214857_3_, boolean p_214857_4_)
-
getShuffledJigsawBlocks
public java.util.List<Template.BlockInfo> getShuffledJigsawBlocks(TemplateManager p_214849_1_, BlockPos p_214849_2_, Rotation p_214849_3_, java.util.Random p_214849_4_)
- Specified by:
getShuffledJigsawBlocks
in classJigsawPiece
-
getBoundingBox
public MutableBoundingBox getBoundingBox(TemplateManager p_214852_1_, BlockPos p_214852_2_, Rotation p_214852_3_)
- Specified by:
getBoundingBox
in classJigsawPiece
-
place
public boolean place(TemplateManager p_230378_1_, ISeedReader p_230378_2_, StructureManager p_230378_3_, ChunkGenerator p_230378_4_, BlockPos p_230378_5_, BlockPos p_230378_6_, Rotation p_230378_7_, MutableBoundingBox p_230378_8_, java.util.Random p_230378_9_, boolean p_230378_10_)
- Specified by:
place
in classJigsawPiece
-
getSettings
protected PlacementSettings getSettings(Rotation p_230379_1_, MutableBoundingBox p_230379_2_, boolean p_230379_3_)
-
getType
public IJigsawDeserializer<?> getType()
- Specified by:
getType
in classJigsawPiece
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-