Record Class CountPlacement
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.placement.CountPlacement
- All Implemented Interfaces:
PlacementModifier, RepeatingPlacement
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CountPlacement> private final IntProviderThe field for thecountrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCountPlacement(IntProvider count) Creates an instance of aCountPlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<CountPlacement> codec()count()Returns the value of thecountrecord component.intcount(RandomSource random, BlockPos origin) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static CountPlacementof(int count) static CountPlacementof(IntProvider count) final StringtoString()Returns a string representation of this record class.Methods inherited from interface RepeatingPlacement
modify
-
Field Details
-
count
The field for thecountrecord component. -
CODEC
-
-
Constructor Details
-
CountPlacement
Creates an instance of aCountPlacementrecord class.- Parameters:
count- the value for thecountrecord component
-
-
Method Details
-
of
-
of
-
count
- Specified by:
countin interfaceRepeatingPlacement
-
codec
- Specified by:
codecin interfacePlacementModifier- Specified by:
codecin interfaceRepeatingPlacement
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
count
Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-