Class StructurePlacement
java.lang.Object
net.minecraft.world.level.levelgen.structure.placement.StructurePlacement
- Direct Known Subclasses:
ConcentricRingsStructurePlacement
,RandomSpreadStructurePlacement
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Deprecated.static interface
static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StructurePlacement>
private final Optional<StructurePlacement.ExclusionZone>
private final float
private final StructurePlacement.FrequencyReductionMethod
private static final int
private final Vec3i
private final int
-
Constructor Summary
ModifierConstructorDescriptionprotected
StructurePlacement
(Vec3i p_227028_, StructurePlacement.FrequencyReductionMethod p_227029_, float p_227030_, int p_227031_, Optional<StructurePlacement.ExclusionZone> p_227032_) -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<StructurePlacement.ExclusionZone>
protected float
getLocatePos
(ChunkPos p_227040_) protected abstract boolean
isPlacementChunk
(ChunkGeneratorStructureState p_256034_, int p_227046_, int p_227047_) boolean
isStructureChunk
(ChunkGeneratorStructureState p_256635_, int p_255959_, int p_256065_) private static boolean
legacyArbitrarySaltProbabilityReducer
(long p_227061_, int p_227062_, int p_227063_, int p_227064_, float p_227065_) private static boolean
legacyPillagerOutpostReducer
(long p_227067_, int p_227068_, int p_227069_, int p_227070_, float p_227071_) private static boolean
legacyProbabilityReducerWithDouble
(long p_227049_, int p_227050_, int p_227051_, int p_227052_, float p_227053_) protected Vec3i
protected static <S extends StructurePlacement>
com.mojang.datafixers.Products.P5<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<S>,Vec3i, StructurePlacement.FrequencyReductionMethod, Float, Integer, Optional<StructurePlacement.ExclusionZone>> placementCodec
(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<S> p_227042_) private static boolean
probabilityReducer
(long p_227034_, int p_227035_, int p_227036_, int p_227037_, float p_227038_) protected int
salt()
abstract StructurePlacementType<?>
type()
-
Field Details
-
CODEC
-
HIGHLY_ARBITRARY_RANDOM_SALT
private static final int HIGHLY_ARBITRARY_RANDOM_SALT- See Also:
-
locateOffset
-
frequencyReductionMethod
-
frequency
private final float frequency -
salt
private final int salt -
exclusionZone
-
-
Constructor Details
-
StructurePlacement
protected StructurePlacement(Vec3i p_227028_, StructurePlacement.FrequencyReductionMethod p_227029_, float p_227030_, int p_227031_, Optional<StructurePlacement.ExclusionZone> p_227032_)
-
-
Method Details
-
placementCodec
protected static <S extends StructurePlacement> com.mojang.datafixers.Products.P5<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<S>,Vec3i, placementCodecStructurePlacement.FrequencyReductionMethod, Float, Integer, Optional<StructurePlacement.ExclusionZone>> (com.mojang.serialization.codecs.RecordCodecBuilder.Instance<S> p_227042_) -
locateOffset
-
frequencyReductionMethod
-
frequency
protected float frequency() -
salt
protected int salt() -
exclusionZone
-
isStructureChunk
public boolean isStructureChunk(ChunkGeneratorStructureState p_256635_, int p_255959_, int p_256065_) -
isPlacementChunk
protected abstract boolean isPlacementChunk(ChunkGeneratorStructureState p_256034_, int p_227046_, int p_227047_) -
getLocatePos
-
type
-
probabilityReducer
private static boolean probabilityReducer(long p_227034_, int p_227035_, int p_227036_, int p_227037_, float p_227038_) -
legacyProbabilityReducerWithDouble
private static boolean legacyProbabilityReducerWithDouble(long p_227049_, int p_227050_, int p_227051_, int p_227052_, float p_227053_) -
legacyArbitrarySaltProbabilityReducer
private static boolean legacyArbitrarySaltProbabilityReducer(long p_227061_, int p_227062_, int p_227063_, int p_227064_, float p_227065_) -
legacyPillagerOutpostReducer
private static boolean legacyPillagerOutpostReducer(long p_227067_, int p_227068_, int p_227069_, int p_227070_, float p_227071_)
-