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> i)
    • 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 state, int sourceX, int sourceZ)
    • applyAdditionalChunkRestrictions

      public boolean applyAdditionalChunkRestrictions(int sourceX, int sourceZ, long levelSeed)
    • applyInteractionsWithOtherStructures

      public boolean applyInteractionsWithOtherStructures(ChunkGeneratorStructureState state, int sourceX, int sourceZ)
    • isPlacementChunk

      protected abstract boolean isPlacementChunk(ChunkGeneratorStructureState state, int sourceX, int sourceZ)
    • getLocatePos

      public BlockPos getLocatePos(ChunkPos chunkPos)
    • type

      public abstract StructurePlacementType<?> type()
    • 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)