Class Structure
java.lang.Object
net.minecraft.world.level.levelgen.structure.Structure
- Direct Known Subclasses:
BuriedTreasureStructure
,EndCityStructure
,IglooStructure
,JigsawStructure
,MineshaftStructure
,NetherFortressStructure
,NetherFossilStructure
,OceanMonumentStructure
,OceanRuinStructure
,RuinedPortalStructure
,ShipwreckStructure
,SinglePieceStructure
,StrongholdStructure
,SwampHutStructure
,WoodlandMansionStructure
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
static final record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Structure>
private final ModifiableStructureInfo
private final Structure.StructureSettings
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadjustBoundingBox
(BoundingBox p_226570_) void
afterPlace
(WorldGenLevel p_226560_, StructureManager p_226561_, ChunkGenerator p_226562_, RandomSource p_226563_, BoundingBox p_226564_, ChunkPos p_226565_, PiecesContainer p_226566_) biomes()
abstract Optional<Structure.GenerationStub>
findGenerationPoint
(Structure.GenerationContext p_226571_) generate
(RegistryAccess p_226597_, ChunkGenerator p_226598_, BiomeSource p_226599_, RandomState p_226600_, StructureTemplateManager p_226601_, long p_226602_, ChunkPos p_226603_, int p_226604_, LevelHeightAccessor p_226605_, Predicate<Holder<Biome>> p_226606_) private static int[]
getCornerHeights
(Structure.GenerationContext p_226614_, int p_226615_, int p_226616_, int p_226617_, int p_226618_) protected static int
getLowestY
(Structure.GenerationContext p_226573_, int p_226574_, int p_226575_) protected static int
getLowestY
(Structure.GenerationContext p_226577_, int p_226578_, int p_226579_, int p_226580_, int p_226581_) protected BlockPos
getLowestYIn5by5BoxOffset7Blocks
(Structure.GenerationContext p_226583_, Rotation p_226584_) Deprecated.Returns The structure's settings, with modifications if called after modifiers are applied in server init..private static boolean
isValidBiome
(Structure.GenerationStub p_226590_, ChunkGenerator p_226591_, RandomState p_226592_, Predicate<Holder<Biome>> p_226593_) Returns Cache of original structure data and structure data modified by structure modifiers.protected static Optional<Structure.GenerationStub>
onTopOfChunkCenter
(Structure.GenerationContext p_226586_, Heightmap.Types p_226587_, Consumer<StructurePiecesBuilder> p_226588_) static <S extends Structure>
com.mojang.serialization.codecs.RecordCodecBuilder<S,Structure.StructureSettings> settingsCodec
(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<S> p_226568_) static <S extends Structure>
com.mojang.serialization.Codec<S>simpleCodec
(Function<Structure.StructureSettings, S> p_226608_) step()
abstract StructureType<?>
type()
-
Field Details
-
DIRECT_CODEC
-
CODEC
-
settings
-
modifiableStructureInfo
-
-
Constructor Details
-
Structure
-
-
Method Details
-
settingsCodec
public static <S extends Structure> com.mojang.serialization.codecs.RecordCodecBuilder<S,Structure.StructureSettings> settingsCodec(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<S> p_226568_) -
simpleCodec
public static <S extends Structure> com.mojang.serialization.Codec<S> simpleCodec(Function<Structure.StructureSettings, S> p_226608_) -
biomes
-
spawnOverrides
-
step
-
terrainAdaptation
-
adjustBoundingBox
-
generate
public StructureStart generate(RegistryAccess p_226597_, ChunkGenerator p_226598_, BiomeSource p_226599_, RandomState p_226600_, StructureTemplateManager p_226601_, long p_226602_, ChunkPos p_226603_, int p_226604_, LevelHeightAccessor p_226605_, Predicate<Holder<Biome>> p_226606_) -
onTopOfChunkCenter
protected static Optional<Structure.GenerationStub> onTopOfChunkCenter(Structure.GenerationContext p_226586_, Heightmap.Types p_226587_, Consumer<StructurePiecesBuilder> p_226588_) -
isValidBiome
private static boolean isValidBiome(Structure.GenerationStub p_226590_, ChunkGenerator p_226591_, RandomState p_226592_, Predicate<Holder<Biome>> p_226593_) -
afterPlace
public void afterPlace(WorldGenLevel p_226560_, StructureManager p_226561_, ChunkGenerator p_226562_, RandomSource p_226563_, BoundingBox p_226564_, ChunkPos p_226565_, PiecesContainer p_226566_) -
getCornerHeights
private static int[] getCornerHeights(Structure.GenerationContext p_226614_, int p_226615_, int p_226616_, int p_226617_, int p_226618_) -
getLowestY
protected static int getLowestY(Structure.GenerationContext p_226573_, int p_226574_, int p_226575_) -
getLowestY
protected static int getLowestY(Structure.GenerationContext p_226577_, int p_226578_, int p_226579_, int p_226580_, int p_226581_) -
getLowestYIn5by5BoxOffset7Blocks
@Deprecated protected BlockPos getLowestYIn5by5BoxOffset7Blocks(Structure.GenerationContext p_226583_, Rotation p_226584_) Deprecated. -
findGenerationPoint
public abstract Optional<Structure.GenerationStub> findGenerationPoint(Structure.GenerationContext p_226571_) -
type
-
modifiableStructureInfo
Returns Cache of original structure data and structure data modified by structure modifiers. Modified structure data is set by server after datapacks and serverconfigs load. Settings field reads are coremodded to redirect to this.- Returns:
- Cache of original structure data and structure data modified by structure modifiers
-
getModifiedStructureSettings
Returns The structure's settings, with modifications if called after modifiers are applied in server init..- Returns:
- The structure's settings, with modifications if called after modifiers are applied in server init.
-