Class StructurePlacement

java.lang.Object
net.minecraft.world.level.levelgen.structure.placement.StructurePlacement
Direct Known Subclasses:
ConcentricRingsStructurePlacement, RandomSpreadStructurePlacement

public abstract class StructurePlacement extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • placementCodec

      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_)
    • locateOffset

      protected Vec3i locateOffset()
    • frequencyReductionMethod

      protected StructurePlacement.FrequencyReductionMethod frequencyReductionMethod()
    • frequency

      protected float frequency()
    • salt

      protected int salt()
    • exclusionZone

      protected Optional<StructurePlacement.ExclusionZone> exclusionZone()
    • isStructureChunk

      public boolean isStructureChunk(ChunkGeneratorStructureState pStructureState, int pX, int pZ)
    • applyAdditionalChunkRestrictions

      public boolean applyAdditionalChunkRestrictions(int pRegionX, int pRegionZ, long pLevelSeed)
    • applyInteractionsWithOtherStructures

      public boolean applyInteractionsWithOtherStructures(ChunkGeneratorStructureState pStructureState, int pX, int pZ)
    • isPlacementChunk

      protected abstract boolean isPlacementChunk(ChunkGeneratorStructureState pStructureState, int pX, int pZ)
    • getLocatePos

      public BlockPos getLocatePos(ChunkPos pChunkPos)
    • type

      public abstract StructurePlacementType<?> type()
    • probabilityReducer

      private static boolean probabilityReducer(long pLevelSeed, int pRegionX, int pRegionZ, int pSalt, float pProbability)
    • legacyProbabilityReducerWithDouble

      private static boolean legacyProbabilityReducerWithDouble(long pBaseSeed, int pSalt, int pChunkX, int pChunkZ, float pProbability)
    • legacyArbitrarySaltProbabilityReducer

      private static boolean legacyArbitrarySaltProbabilityReducer(long pLevelSeed, int pSalt, int pRegionX, int pRegionZ, float pProbability)
    • legacyPillagerOutpostReducer

      private static boolean legacyPillagerOutpostReducer(long pLevelSeed, int pSalt, int pRegionX, int pRegionZ, float pProbability)