Package net.minecraft.structure
Class StructureStart<C extends FeatureConfig>
java.lang.Object
net.minecraft.structure.StructureStart<C>
- All Implemented Interfaces:
StructurePiecesHolder
- Direct Known Subclasses:
BuriedTreasureFeature.Start,DesertPyramidFeature.Start,EndCityFeature.Start,IglooFeature.Start,JungleTempleFeature.Start,MarginedStructureStart,MineshaftFeature.Start,NetherFortressFeature.Start,OceanMonumentFeature.Start,OceanRuinFeature.Start,RuinedPortalFeature.Start,ShipwreckFeature.Start,SwampHutFeature.Start,WoodlandMansionFeature.Start
public abstract class StructureStart<C extends FeatureConfig>
extends Object
implements StructurePiecesHolder
A structure start is created to describe a structure that will be generated by
chunk generation. It contains a definition of its pieces and is associated
with the chunk that the structure originates from.
- Mappings:
Namespace Name official dbointermediary net/minecraft/class_3449named net/minecraft/structure/StructureStart
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<StructurePiece>static final StructureStart<?>private final StructureFeature<C>static final Stringprivate static final Loggerprivate final ChunkPosprotected final ChunkRandomprivate intThe number of chunks that intersect the structures bounding box, and have stored references to its starting chunk. -
Constructor Summary
ConstructorsConstructorDescriptionStructureStart(StructureFeature<C> feature, ChunkPos pos, int references, long seed) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPiece(StructurePiece piece) Adds a structure piece into this holder.protected BlockBoxvoidprotected booleanvoidgenerateStructure(StructureWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, Random random, BlockBox box, ChunkPos chunkPos) static @Nullable StructurePiecegetIntersecting(List<StructurePiece> pieces, BlockBox box) getIntersecting(BlockBox box) Returns an arbitrary piece in this holder that intersects the givenbox, ornullif there is no such piece.getPos()protected intintbooleanbooleanvoidabstract voidinit(DynamicRegistryManager registryManager, ChunkGenerator chunkGenerator, StructureManager manager, ChunkPos pos, Biome biome, C config, HeightLimitView world) booleanprotected voidrandomUpwardTranslation(int seaLevel, int int2, Random random, int int3) protected voidrandomUpwardTranslation(Random random, int minY, int maxY) private voidfinal BlockBoxtoNbt(ServerWorld world, ChunkPos chunkPos) protected voidtranslateUpward(int amount)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official eLdbo;e:Lorg/apache/logging/log4j/Logger;intermediary field_29328Lnet/minecraft/class_3449;field_29328:Lorg/apache/logging/log4j/Logger;named LOGGERLnet/minecraft/structure/StructureStart;LOGGER:Lorg/apache/logging/log4j/Logger;
-
INVALID
- See Also:
- Mappings:
Namespace Name Mixin selector official aLdbo;a:Ljava/lang/String;intermediary field_31662Lnet/minecraft/class_3449;field_31662:Ljava/lang/String;named INVALIDLnet/minecraft/structure/StructureStart;INVALID:Ljava/lang/String;
-
DEFAULT
- Mappings:
Namespace Name Mixin selector official bLdbo;b:Ldbo;intermediary field_16713Lnet/minecraft/class_3449;field_16713:Lnet/minecraft/class_3449;named DEFAULTLnet/minecraft/structure/StructureStart;DEFAULT:Lnet/minecraft/structure/StructureStart;
-
feature
- Mappings:
Namespace Name Mixin selector official fLdbo;f:Lcud;intermediary field_16714Lnet/minecraft/class_3449;field_16714:Lnet/minecraft/class_3195;named featureLnet/minecraft/structure/StructureStart;feature:Lnet/minecraft/world/gen/feature/StructureFeature;
-
children
- Mappings:
Namespace Name Mixin selector official cLdbo;c:Ljava/util/List;intermediary field_15325Lnet/minecraft/class_3449;field_15325:Ljava/util/List;named childrenLnet/minecraft/structure/StructureStart;children:Ljava/util/List;
-
pos
- Mappings:
Namespace Name Mixin selector official gLdbo;g:Lbvv;intermediary field_29070Lnet/minecraft/class_3449;field_29070:Lnet/minecraft/class_1923;named posLnet/minecraft/structure/StructureStart;pos:Lnet/minecraft/util/math/ChunkPos;
-
references
private int referencesThe number of chunks that intersect the structures bounding box, and have stored references to its starting chunk.This number can be lower than the number of potential intersecting chunks, since it is only updated when an actual reference is created in such chunks (when they enter the corresponding chunk generation phase).
- Mappings:
Namespace Name Mixin selector official hLdbo;h:Iintermediary field_15326Lnet/minecraft/class_3449;field_15326:Inamed referencesLnet/minecraft/structure/StructureStart;references:I
-
random
- Mappings:
Namespace Name Mixin selector official dLdbo;d:Lcqn;intermediary field_16715Lnet/minecraft/class_3449;field_16715:Lnet/minecraft/class_2919;named randomLnet/minecraft/structure/StructureStart;random:Lnet/minecraft/world/gen/ChunkRandom;
-
boundingBox
- Mappings:
Namespace Name Mixin selector official iLdbo;i:Ldar;intermediary field_31663Lnet/minecraft/class_3449;field_31663:Lnet/minecraft/class_3341;named boundingBoxLnet/minecraft/structure/StructureStart;boundingBox:Lnet/minecraft/util/math/BlockBox;
-
-
Constructor Details
-
StructureStart
- Mappings:
Namespace Name Mixin selector official <init>Ldbo;<init>(Lcud;Lbvv;IJ)Vintermediary <init>Lnet/minecraft/class_3449;<init>(Lnet/minecraft/class_3195;Lnet/minecraft/class_1923;IJ)Vnamed <init>Lnet/minecraft/structure/StructureStart;<init>(Lnet/minecraft/world/gen/feature/StructureFeature;Lnet/minecraft/util/math/ChunkPos;IJ)V
-
-
Method Details
-
init
public abstract void init(DynamicRegistryManager registryManager, ChunkGenerator chunkGenerator, StructureManager manager, ChunkPos pos, Biome biome, C config, HeightLimitView world) - Mappings:
Namespace Name Mixin selector official aLdbo;a(Lgx;Lcmo;Ldcq;Lbvv;Lbxp;Lcvh;Lbws;)Vintermediary method_16655Lnet/minecraft/class_3449;method_16655(Lnet/minecraft/class_5455;Lnet/minecraft/class_2794;Lnet/minecraft/class_3485;Lnet/minecraft/class_1923;Lnet/minecraft/class_1959;Lnet/minecraft/class_3037;Lnet/minecraft/class_5539;)Vnamed initLnet/minecraft/structure/StructureStart;init(Lnet/minecraft/util/registry/DynamicRegistryManager;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/structure/StructureManager;Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/world/biome/Biome;Lnet/minecraft/world/gen/feature/FeatureConfig;Lnet/minecraft/world/HeightLimitView;)V
-
setBoundingBoxFromChildren
- Mappings:
Namespace Name Mixin selector official cLdbo;c()Ldar;intermediary method_14969Lnet/minecraft/class_3449;method_14969()Lnet/minecraft/class_3341;named setBoundingBoxFromChildrenLnet/minecraft/structure/StructureStart;setBoundingBoxFromChildren()Lnet/minecraft/util/math/BlockBox;
-
calculateBoundingBox
- Mappings:
Namespace Name Mixin selector official bLdbo;b()Ldar;intermediary method_36217Lnet/minecraft/class_3449;method_36217()Lnet/minecraft/class_3341;named calculateBoundingBoxLnet/minecraft/structure/StructureStart;calculateBoundingBox()Lnet/minecraft/util/math/BlockBox;
-
getChildren
- Mappings:
Namespace Name Mixin selector official dLdbo;d()Ljava/util/List;intermediary method_14963Lnet/minecraft/class_3449;method_14963()Ljava/util/List;named getChildrenLnet/minecraft/structure/StructureStart;getChildren()Ljava/util/List;
-
generateStructure
public void generateStructure(StructureWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, Random random, BlockBox box, ChunkPos chunkPos) - Mappings:
Namespace Name Mixin selector official aLdbo;a(Lbxl;Lbxh;Lcmo;Ljava/util/Random;Ldar;Lbvv;)Vintermediary method_14974Lnet/minecraft/class_3449;method_14974(Lnet/minecraft/class_5281;Lnet/minecraft/class_5138;Lnet/minecraft/class_2794;Ljava/util/Random;Lnet/minecraft/class_3341;Lnet/minecraft/class_1923;)Vnamed generateStructureLnet/minecraft/structure/StructureStart;generateStructure(Lnet/minecraft/world/StructureWorldAccess;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Ljava/util/Random;Lnet/minecraft/util/math/BlockBox;Lnet/minecraft/util/math/ChunkPos;)V
-
toNbt
- Mappings:
Namespace Name Mixin selector official aLdbo;a(Labr;Lbvv;)Lna;intermediary method_14972Lnet/minecraft/class_3449;method_14972(Lnet/minecraft/class_3218;Lnet/minecraft/class_1923;)Lnet/minecraft/class_2487;named toNbtLnet/minecraft/structure/StructureStart;toNbt(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/ChunkPos;)Lnet/minecraft/nbt/NbtCompound;
-
randomUpwardTranslation
- Mappings:
Namespace Name Mixin selector official aLdbo;a(IILjava/util/Random;I)Vintermediary method_14978Lnet/minecraft/class_3449;method_14978(IILjava/util/Random;I)Vnamed randomUpwardTranslationLnet/minecraft/structure/StructureStart;randomUpwardTranslation(IILjava/util/Random;I)V
-
randomUpwardTranslation
- Mappings:
Namespace Name Mixin selector official aLdbo;a(Ljava/util/Random;II)Vintermediary method_14976Lnet/minecraft/class_3449;method_14976(Ljava/util/Random;II)Vnamed randomUpwardTranslationLnet/minecraft/structure/StructureStart;randomUpwardTranslation(Ljava/util/Random;II)V
-
translateUpward
protected void translateUpward(int amount) - Mappings:
Namespace Name Mixin selector official aLdbo;a(I)Vintermediary method_35463Lnet/minecraft/class_3449;method_35463(I)Vnamed translateUpwardLnet/minecraft/structure/StructureStart;translateUpward(I)V
-
resetBoundingBox
private void resetBoundingBox()- Mappings:
Namespace Name Mixin selector official nLdbo;n()Vintermediary method_35468Lnet/minecraft/class_3449;method_35468()Vnamed resetBoundingBoxLnet/minecraft/structure/StructureStart;resetBoundingBox()V
-
hasChildren
public boolean hasChildren()- Mappings:
Namespace Name Mixin selector official eLdbo;e()Zintermediary method_16657Lnet/minecraft/class_3449;method_16657()Znamed hasChildrenLnet/minecraft/structure/StructureStart;hasChildren()Z
-
getPos
- Mappings:
Namespace Name Mixin selector official fLdbo;f()Lbvv;intermediary method_34000Lnet/minecraft/class_3449;method_34000()Lnet/minecraft/class_1923;named getPosLnet/minecraft/structure/StructureStart;getPos()Lnet/minecraft/util/math/ChunkPos;
-
getBlockPos
- Mappings:
Namespace Name Mixin selector official aLdbo;a()Lgg;intermediary method_14962Lnet/minecraft/class_3449;method_14962()Lnet/minecraft/class_2338;named getBlockPosLnet/minecraft/structure/StructureStart;getBlockPos()Lnet/minecraft/util/math/BlockPos;
-
isInExistingChunk
public boolean isInExistingChunk()- Mappings:
Namespace Name Mixin selector official gLdbo;g()Zintermediary method_14979Lnet/minecraft/class_3449;method_14979()Znamed isInExistingChunkLnet/minecraft/structure/StructureStart;isInExistingChunk()Z
-
incrementReferences
public void incrementReferences()- Mappings:
Namespace Name Mixin selector official hLdbo;h()Vintermediary method_14964Lnet/minecraft/class_3449;method_14964()Vnamed incrementReferencesLnet/minecraft/structure/StructureStart;incrementReferences()V
-
getReferences
public int getReferences()- Mappings:
Namespace Name Mixin selector official iLdbo;i()Iintermediary method_23676Lnet/minecraft/class_3449;method_23676()Inamed getReferencesLnet/minecraft/structure/StructureStart;getReferences()I
-
getReferenceCountToBeInExistingChunk
protected int getReferenceCountToBeInExistingChunk()- Mappings:
Namespace Name Mixin selector official jLdbo;j()Iintermediary method_14970Lnet/minecraft/class_3449;method_14970()Inamed getReferenceCountToBeInExistingChunkLnet/minecraft/structure/StructureStart;getReferenceCountToBeInExistingChunk()I
-
getFeature
- Mappings:
Namespace Name Mixin selector official kLdbo;k()Lcud;intermediary method_16656Lnet/minecraft/class_3449;method_16656()Lnet/minecraft/class_3195;named getFeatureLnet/minecraft/structure/StructureStart;getFeature()Lnet/minecraft/world/gen/feature/StructureFeature;
-
addPiece
Adds a structure piece into this holder.- Specified by:
addPiecein interfaceStructurePiecesHolder- Parameters:
piece- the piece to add- Mappings:
Namespace Name Mixin selector official aLdbn;a(Ldbm;)Vintermediary method_35462Lnet/minecraft/class_6130;method_35462(Lnet/minecraft/class_3443;)Vnamed addPieceLnet/minecraft/structure/StructurePiecesHolder;addPiece(Lnet/minecraft/structure/StructurePiece;)V
-
getIntersecting
Returns an arbitrary piece in this holder that intersects the givenbox, ornullif there is no such piece.- Specified by:
getIntersectingin interfaceStructurePiecesHolder- Parameters:
box- the box to check intersection against- Mappings:
Namespace Name Mixin selector official aLdbn;a(Ldar;)Ldbm;intermediary method_35461Lnet/minecraft/class_6130;method_35461(Lnet/minecraft/class_3341;)Lnet/minecraft/class_3443;named getIntersectingLnet/minecraft/structure/StructurePiecesHolder;getIntersecting(Lnet/minecraft/util/math/BlockBox;)Lnet/minecraft/structure/StructurePiece;
-
clearChildren
public void clearChildren()- Mappings:
Namespace Name Mixin selector official lLdbo;l()Vintermediary method_35466Lnet/minecraft/class_3449;method_35466()Vnamed clearChildrenLnet/minecraft/structure/StructureStart;clearChildren()V
-
hasNoChildren
public boolean hasNoChildren()- Mappings:
Namespace Name Mixin selector official mLdbo;m()Zintermediary method_35467Lnet/minecraft/class_3449;method_35467()Znamed hasNoChildrenLnet/minecraft/structure/StructureStart;hasNoChildren()Z
-
getIntersecting
@Nullable public static @Nullable StructurePiece getIntersecting(List<StructurePiece> pieces, BlockBox box) - Mappings:
Namespace Name Mixin selector official aLdbo;a(Ljava/util/List;Ldar;)Ldbm;intermediary method_35465Lnet/minecraft/class_3449;method_35465(Ljava/util/List;Lnet/minecraft/class_3341;)Lnet/minecraft/class_3443;named getIntersectingLnet/minecraft/structure/StructureStart;getIntersecting(Ljava/util/List;Lnet/minecraft/util/math/BlockBox;)Lnet/minecraft/structure/StructurePiece;
-
contains
- Mappings:
Namespace Name Mixin selector official aLdbo;a(Lgg;)Zintermediary method_35464Lnet/minecraft/class_3449;method_35464(Lnet/minecraft/class_2338;)Znamed containsLnet/minecraft/structure/StructureStart;contains(Lnet/minecraft/util/math/BlockPos;)Z
-