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 daxintermediary net/minecraft/class_3449named net/minecraft/structure/StructureStart
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<StructurePiece>static StructureStart<?>private StructureFeature<C>static Stringprivate static Loggerprivate ChunkPosprotected 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 voidtoNbt(ServerWorld world, ChunkPos chunkPos)protected voidtranslateUpward(int amount)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official eLdax;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:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official aLdax;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 bLdax;b:Ldax;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 fLdax;f:Lctm;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 cLdax;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 gLdax;g:Lbve;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 hLdax;h:Iintermediary field_15326Lnet/minecraft/class_3449;field_15326:Inamed referencesLnet/minecraft/structure/StructureStart;references:I
-
random
- Mappings:
Namespace Name Mixin selector official dLdax;d:Lcpw;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 iLdax;i:Ldaa;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>Ldax;<init>(Lctm;Lbve;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 aLdax;a(Lgs;Lclx;Ldbz;Lbve;Lbwy;Lcuq;Lbwb;)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 cLdax;c()Ldaa;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 bLdax;b()Ldaa;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 dLdax;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 aLdax;a(Lbwu;Lbwq;Lclx;Ljava/util/Random;Ldaa;Lbve;)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 aLdax;a(Labl;Lbve;)Lmv;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 aLdax;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 aLdax;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 aLdax;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 nLdax;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 eLdax;e()Zintermediary method_16657Lnet/minecraft/class_3449;method_16657()Znamed hasChildrenLnet/minecraft/structure/StructureStart;hasChildren()Z
-
getPos
- Mappings:
Namespace Name Mixin selector official fLdax;f()Lbve;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 aLdax;a()Lgb;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 gLdax;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 hLdax;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 iLdax;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 jLdax;j()Iintermediary method_14970Lnet/minecraft/class_3449;method_14970()Inamed getReferenceCountToBeInExistingChunkLnet/minecraft/structure/StructureStart;getReferenceCountToBeInExistingChunk()I
-
getFeature
- Mappings:
Namespace Name Mixin selector official kLdax;k()Lctm;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 aLdaw;a(Ldav;)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 aLdaw;a(Ldaa;)Ldav;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 lLdax;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 mLdax;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 aLdax;a(Ljava/util/List;Ldaa;)Ldav;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 aLdax;a(Lgb;)Zintermediary method_35464Lnet/minecraft/class_3449;method_35464(Lnet/minecraft/class_2338;)Znamed containsLnet/minecraft/structure/StructureStart;contains(Lnet/minecraft/util/math/BlockPos;)Z
-