Record Class RandomSpreadStructurePlacement

java.lang.Object
java.lang.Record
net.minecraft.world.gen.chunk.placement.RandomSpreadStructurePlacement
Record Components:
spacing -
separation -
spreadType -
salt -
locateOffset -
All Implemented Interfaces:
StructurePlacement

public record RandomSpreadStructurePlacement(int spacing, int separation, SpreadType spreadType, int salt, Vec3i locateOffset) extends Record implements StructurePlacement
Mappings:
Namespace Name
official dge
intermediary net/minecraft/class_6872
named net/minecraft/world/gen/chunk/placement/RandomSpreadStructurePlacement
official c
intermediary comp_340
named spacing
official d
intermediary comp_341
named separation
official e
intermediary comp_342
named spreadType
official f
intermediary comp_343
named salt
official g
intermediary comp_344
named locateOffset
  • Field Details

    • spacing

      private final int spacing
      The field for the spacing record component.
    • separation

      private final int separation
      The field for the separation record component.
    • spreadType

      private final SpreadType spreadType
      The field for the spreadType record component.
    • salt

      private final int salt
      The field for the salt record component.
    • locateOffset

      private final Vec3i locateOffset
      The field for the locateOffset record component.
    • CODEC

      public static final com.mojang.serialization.Codec<RandomSpreadStructurePlacement> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Ldge;a:Lcom/mojang/serialization/Codec;
      intermediary field_36420 Lnet/minecraft/class_6872;field_36420:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/world/gen/chunk/placement/RandomSpreadStructurePlacement;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • RandomSpreadStructurePlacement

      public RandomSpreadStructurePlacement(int spacing, int separation, SpreadType spreadType, int salt)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldge;<init>(IILdgf;I)V
      intermediary <init> Lnet/minecraft/class_6872;<init>(IILnet/minecraft/class_6873;I)V
      named <init> Lnet/minecraft/world/gen/chunk/placement/RandomSpreadStructurePlacement;<init>(IILnet/minecraft/world/gen/chunk/placement/SpreadType;I)V
    • RandomSpreadStructurePlacement

      public RandomSpreadStructurePlacement(int int2, int int3, SpreadType spreadType, int int4, Vec3i vec3i)
  • Method Details

    • getStartChunk

      public ChunkPos getStartChunk(long seed, int x, int z)
      Mappings:
      Namespace Name Mixin selector
      official a Ldge;a(JII)Lcac;
      intermediary method_40169 Lnet/minecraft/class_6872;method_40169(JII)Lnet/minecraft/class_1923;
      named getStartChunk Lnet/minecraft/world/gen/chunk/placement/RandomSpreadStructurePlacement;getStartChunk(JII)Lnet/minecraft/util/math/ChunkPos;
    • isStartChunk

      public boolean isStartChunk(ChunkGenerator chunkGenerator, long long2, int int2, int int3)
      Specified by:
      isStartChunk in interface StructurePlacement
      Mappings:
      Namespace Name Mixin selector
      official a Ldgg;a(Lcqr;JII)Z
      intermediary method_40168 Lnet/minecraft/class_6874;method_40168(Lnet/minecraft/class_2794;JII)Z
      named isStartChunk Lnet/minecraft/world/gen/chunk/placement/StructurePlacement;isStartChunk(Lnet/minecraft/world/gen/chunk/ChunkGenerator;JII)Z
    • getType

      public StructurePlacementType<?> getType()
      Specified by:
      getType in interface StructurePlacement
      Mappings:
      Namespace Name Mixin selector
      official a Ldgg;a()Ldgh;
      intermediary method_40166 Lnet/minecraft/class_6874;method_40166()Lnet/minecraft/class_6875;
      named getType Lnet/minecraft/world/gen/chunk/placement/StructurePlacement;getType()Lnet/minecraft/world/gen/chunk/placement/StructurePlacementType;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • spacing

      public int spacing()
      Returns the value of the spacing record component.
      Returns:
      the value of the spacing record component
    • separation

      public int separation()
      Returns the value of the separation record component.
      Returns:
      the value of the separation record component
    • spreadType

      public SpreadType spreadType()
      Returns the value of the spreadType record component.
      Returns:
      the value of the spreadType record component
    • salt

      public int salt()
      Returns the value of the salt record component.
      Returns:
      the value of the salt record component
    • locateOffset

      public Vec3i locateOffset()
      Returns the value of the locateOffset record component.
      Returns:
      the value of the locateOffset record component