Class AbstractSpreadingStructurePlacement
java.lang.Object
net.minecraft.world.level.levelgen.structure.placement.AbstractSpreadingStructurePlacement
- All Implemented Interfaces:
StructurePlacement
- Direct Known Subclasses:
ConcentricRingsStructurePlacement, RandomSpreadStructurePlacement
public abstract class AbstractSpreadingStructurePlacement
extends Object
implements StructurePlacement
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDeprecated.static interfacestatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<AbstractSpreadingStructurePlacement.ExclusionZone> private final floatprivate static final intprivate final Vec3iprivate final intFields inherited from interface StructurePlacement
CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSpreadingStructurePlacement(Vec3i locateOffset, AbstractSpreadingStructurePlacement.FrequencyReductionMethod frequencyReductionMethod, float frequency, int salt, Optional<AbstractSpreadingStructurePlacement.ExclusionZone> exclusionZone) -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyAdditionalChunkRestrictions(int sourceX, int sourceZ, long levelSeed) booleanapplyInteractionsWithOtherStructures(ChunkGeneratorStructureState state, int sourceX, int sourceZ) abstract com.mojang.serialization.MapCodec<? extends AbstractSpreadingStructurePlacement> codec()protected floatprotected abstract booleanisPlacementChunk(ChunkGeneratorStructureState state, int sourceX, int sourceZ) booleanisStructureChunk(ChunkGeneratorStructureState state, int sourceX, int sourceZ) private static booleanlegacyArbitrarySaltProbabilityReducer(long seed, int salt, int sourceX, int sourceZ, float probability) private static booleanlegacyPillagerOutpostReducer(long seed, int salt, int sourceX, int sourceZ, float probability) private static booleanlegacyProbabilityReducerWithDouble(long seed, int salt, int sourceX, int sourceZ, float probability) protected static <S extends AbstractSpreadingStructurePlacement>
com.mojang.datafixers.Products.P5<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<S>, Vec3i, AbstractSpreadingStructurePlacement.FrequencyReductionMethod, Float, Integer, Optional<AbstractSpreadingStructurePlacement.ExclusionZone>> placementCodec(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<S> i) private static booleanprobabilityReducer(long seed, int salt, int sourceX, int sourceZ, float probability) protected intsalt()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StructurePlacement
getLocatePos
-
Field Details
-
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
-
AbstractSpreadingStructurePlacement
protected AbstractSpreadingStructurePlacement(Vec3i locateOffset, AbstractSpreadingStructurePlacement.FrequencyReductionMethod frequencyReductionMethod, float frequency, int salt, Optional<AbstractSpreadingStructurePlacement.ExclusionZone> exclusionZone)
-
-
Method Details
-
placementCodec
protected static <S extends AbstractSpreadingStructurePlacement> com.mojang.datafixers.Products.P5<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<S>, Vec3i, AbstractSpreadingStructurePlacement.FrequencyReductionMethod, Float, Integer, Optional<AbstractSpreadingStructurePlacement.ExclusionZone>> placementCodec(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<S> i) -
codec
public abstract com.mojang.serialization.MapCodec<? extends AbstractSpreadingStructurePlacement> codec()- Specified by:
codecin interfaceStructurePlacement
-
locateOffset
- Specified by:
locateOffsetin interfaceStructurePlacement
-
frequencyReductionMethod
-
frequency
protected float frequency() -
salt
protected int salt() -
exclusionZone
-
isStructureChunk
- Specified by:
isStructureChunkin interfaceStructurePlacement
-
applyAdditionalChunkRestrictions
public boolean applyAdditionalChunkRestrictions(int sourceX, int sourceZ, long levelSeed) - Specified by:
applyAdditionalChunkRestrictionsin interfaceStructurePlacement
-
applyInteractionsWithOtherStructures
public boolean applyInteractionsWithOtherStructures(ChunkGeneratorStructureState state, int sourceX, int sourceZ) -
isPlacementChunk
protected abstract boolean isPlacementChunk(ChunkGeneratorStructureState state, int sourceX, int sourceZ) -
probabilityReducer
private static boolean probabilityReducer(long seed, int salt, int sourceX, int sourceZ, float probability) -
legacyProbabilityReducerWithDouble
private static boolean legacyProbabilityReducerWithDouble(long seed, int salt, int sourceX, int sourceZ, float probability) -
legacyArbitrarySaltProbabilityReducer
private static boolean legacyArbitrarySaltProbabilityReducer(long seed, int salt, int sourceX, int sourceZ, float probability) -
legacyPillagerOutpostReducer
private static boolean legacyPillagerOutpostReducer(long seed, int salt, int sourceX, int sourceZ, float probability)
-