Class StructureStart<C extends FeatureConfiguration>
java.lang.Object
net.minecraft.world.level.levelgen.structure.StructureStart<C>
- All Implemented Interfaces:
StructurePieceAccessor
- Direct Known Subclasses:
BuriedTreasureFeature.BuriedTreasureStart
,DesertPyramidFeature.FeatureStart
,EndCityFeature.EndCityStart
,IglooFeature.FeatureStart
,JunglePyramidFeature.FeatureStart
,MineshaftFeature.MineShaftStart
,NetherFortressFeature.NetherBridgeStart
,NoiseAffectingStructureStart
,OceanMonumentFeature.OceanMonumentStart
,OceanRuinFeature.OceanRuinStart
,RuinedPortalFeature.FeatureStart
,ShipwreckFeature.FeatureStart
,SwamplandHutFeature.FeatureStart
,WoodlandMansionFeature.WoodlandMansionStart
public abstract class StructureStart<C extends FeatureConfiguration>
extends Object
implements StructurePieceAccessor
-
Field Summary
Modifier and TypeFieldDescriptionprivate BoundingBox
private ChunkPos
private StructureFeature<C>
static StructureStart<?>
static String
private static org.apache.logging.log4j.Logger
protected List<StructurePiece>
protected WorldgenRandom
private int
-
Constructor Summary
ConstructorDescriptionStructureStart(StructureFeature<C> p_163595_, ChunkPos p_163596_, int p_163597_, long p_163598_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPiece(StructurePiece p_163612_)
void
boolean
void
protected BoundingBox
createTag(ServerLevel p_163607_, ChunkPos p_163608_)
static StructurePiece
findCollisionPiece(List<StructurePiece> p_163623_, BoundingBox p_163624_)
findCollisionPiece(BoundingBox p_163610_)
abstract void
generatePieces(RegistryAccess p_163615_, ChunkGenerator p_163616_, StructureManager p_163617_, ChunkPos p_163618_, Biome p_163619_, C p_163620_, LevelHeightAccessor p_163621_)
protected int
int
boolean
private void
protected boolean
isInsidePiece(BlockPos p_163614_)
boolean
isValid()
protected void
moveBelowSeaLevel(int p_163602_, int p_163603_, Random p_163604_, int p_163605_)
protected void
moveInsideHeights(Random p_73598_, int p_73599_, int p_73600_)
protected void
offsetPiecesVertically(int p_163600_)
void
placeInChunk(WorldGenLevel p_73584_, StructureFeatureManager p_73585_, ChunkGenerator p_73586_, Random p_73587_, BoundingBox p_73588_, ChunkPos p_73589_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
INVALID_START_ID
- See Also:
- Constant Field Values
-
INVALID_START
-
feature
-
pieces
-
chunkPos
-
references
private int references -
random
-
cachedBoundingBox
-
-
Constructor Details
-
StructureStart
public StructureStart(StructureFeature<C> p_163595_, ChunkPos p_163596_, int p_163597_, long p_163598_)
-
-
Method Details
-
generatePieces
public abstract void generatePieces(RegistryAccess p_163615_, ChunkGenerator p_163616_, StructureManager p_163617_, ChunkPos p_163618_, Biome p_163619_, C p_163620_, LevelHeightAccessor p_163621_) -
getBoundingBox
-
createBoundingBox
-
getPieces
-
placeInChunk
public void placeInChunk(WorldGenLevel p_73584_, StructureFeatureManager p_73585_, ChunkGenerator p_73586_, Random p_73587_, BoundingBox p_73588_, ChunkPos p_73589_) -
createTag
-
moveBelowSeaLevel
-
moveInsideHeights
-
offsetPiecesVertically
protected void offsetPiecesVertically(int p_163600_) -
invalidateCache
private void invalidateCache() -
isValid
public boolean isValid() -
getChunkPos
-
getLocatePos
-
canBeReferenced
public boolean canBeReferenced() -
addReference
public void addReference() -
getReferences
public int getReferences() -
getMaxReferences
protected int getMaxReferences() -
getFeature
-
addPiece
- Specified by:
addPiece
in interfaceStructurePieceAccessor
-
findCollisionPiece
- Specified by:
findCollisionPiece
in interfaceStructurePieceAccessor
-
clearPieces
public void clearPieces() -
hasNoPieces
public boolean hasNoPieces() -
findCollisionPiece
@Nullable public static StructurePiece findCollisionPiece(List<StructurePiece> p_163623_, BoundingBox p_163624_) -
isInsidePiece
-