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 dgeintermediary net/minecraft/class_6872named net/minecraft/world/gen/chunk/placement/RandomSpreadStructurePlacementofficial cintermediary comp_340named spacingofficial dintermediary comp_341named separationofficial eintermediary comp_342named spreadTypeofficial fintermediary comp_343named saltofficial gintermediary comp_344named locateOffset
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RandomSpreadStructurePlacement>private final Vec3iThe field for thelocateOffsetrecord component.private final intThe field for thesaltrecord component.private final intThe field for theseparationrecord component.private final intThe field for thespacingrecord component.private final SpreadTypeThe field for thespreadTyperecord component.Fields inherited from interface net.minecraft.world.gen.chunk.placement.StructurePlacement
TYPE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionRandomSpreadStructurePlacement(int spacing, int separation, SpreadType spreadType, int salt) RandomSpreadStructurePlacement(int int2, int int3, SpreadType spreadType, int int4, Vec3i vec3i) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getStartChunk(long seed, int x, int z) getType()final inthashCode()Returns a hash code value for this object.booleanisStartChunk(ChunkGenerator chunkGenerator, long long2, int int2, int int3) Returns the value of thelocateOffsetrecord component.intsalt()Returns the value of thesaltrecord component.intReturns the value of theseparationrecord component.intspacing()Returns the value of thespacingrecord component.Returns the value of thespreadTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
spacing
private final int spacingThe field for thespacingrecord component. -
separation
private final int separationThe field for theseparationrecord component. -
spreadType
The field for thespreadTyperecord component. -
salt
private final int saltThe field for thesaltrecord component. -
locateOffset
The field for thelocateOffsetrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLdge;a:Lcom/mojang/serialization/Codec;intermediary field_36420Lnet/minecraft/class_6872;field_36420:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/world/gen/chunk/placement/RandomSpreadStructurePlacement;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
RandomSpreadStructurePlacement
- Mappings:
Namespace Name Mixin selector official <init>Ldge;<init>(IILdgf;I)Vintermediary <init>Lnet/minecraft/class_6872;<init>(IILnet/minecraft/class_6873;I)Vnamed <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
- Mappings:
Namespace Name Mixin selector official aLdge;a(JII)Lcac;intermediary method_40169Lnet/minecraft/class_6872;method_40169(JII)Lnet/minecraft/class_1923;named getStartChunkLnet/minecraft/world/gen/chunk/placement/RandomSpreadStructurePlacement;getStartChunk(JII)Lnet/minecraft/util/math/ChunkPos;
-
isStartChunk
- Specified by:
isStartChunkin interfaceStructurePlacement- Mappings:
Namespace Name Mixin selector official aLdgg;a(Lcqr;JII)Zintermediary method_40168Lnet/minecraft/class_6874;method_40168(Lnet/minecraft/class_2794;JII)Znamed isStartChunkLnet/minecraft/world/gen/chunk/placement/StructurePlacement;isStartChunk(Lnet/minecraft/world/gen/chunk/ChunkGenerator;JII)Z
-
getType
- Specified by:
getTypein interfaceStructurePlacement- Mappings:
Namespace Name Mixin selector official aLdgg;a()Ldgh;intermediary method_40166Lnet/minecraft/class_6874;method_40166()Lnet/minecraft/class_6875;named getTypeLnet/minecraft/world/gen/chunk/placement/StructurePlacement;getType()Lnet/minecraft/world/gen/chunk/placement/StructurePlacementType;
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
spacing
public int spacing()Returns the value of thespacingrecord component.- Returns:
- the value of the
spacingrecord component
-
separation
public int separation()Returns the value of theseparationrecord component.- Returns:
- the value of the
separationrecord component
-
spreadType
Returns the value of thespreadTyperecord component.- Returns:
- the value of the
spreadTyperecord component
-
salt
public int salt()Returns the value of thesaltrecord component.- Returns:
- the value of the
saltrecord component
-
locateOffset
Returns the value of thelocateOffsetrecord component.- Returns:
- the value of the
locateOffsetrecord component
-