Record Class HeightmapPlacement
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.placement.HeightmapPlacement
- All Implemented Interfaces:
PlacementModifier
public record HeightmapPlacement(Heightmap.Types heightmap)
extends Record
implements PlacementModifier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<HeightmapPlacement> private final Heightmap.TypesThe field for theheightmaprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHeightmapPlacement(Heightmap.Types heightmap) Creates an instance of aHeightmapPlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<HeightmapPlacement> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theheightmaprecord component.voidmodify(PlacementContext context, RandomSource random, BlockPos origin, Consumer<BlockPos> output) static HeightmapPlacementonHeightmap(Heightmap.Types heightmap) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
heightmap
The field for theheightmaprecord component. -
CODEC
-
-
Constructor Details
-
HeightmapPlacement
Creates an instance of aHeightmapPlacementrecord class.- Parameters:
heightmap- the value for theheightmaprecord component
-
-
Method Details
-
onHeightmap
-
modify
public void modify(PlacementContext context, RandomSource random, BlockPos origin, Consumer<BlockPos> output) - Specified by:
modifyin interfacePlacementModifier
-
codec
- Specified by:
codecin interfacePlacementModifier
-
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). -
heightmap
Returns the value of theheightmaprecord component.- Returns:
- the value of the
heightmaprecord component
-