Record Class FoliagePlacer.FoliageAttachment
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer.FoliageAttachment
- Enclosing class:
FoliagePlacer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thefoliageHeightOffsetrecord component.private final BlockPosThe field for theposrecord component.private final intThe field for theradiusOffsetXZrecord component.private final intThe field for thesizeXrecord component.private final intThe field for thesizeZrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFoliageAttachment(BlockPos pos, int radiusOffsetXZ, boolean doubleTrunk) FoliageAttachment(BlockPos pos, int radiusOffsetXZ, int sizeX, int sizeZ) FoliageAttachment(BlockPos pos, int radiusOffsetXZ, int foliageHeightOffset, int sizeX, int sizeZ) Creates an instance of aFoliageAttachmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefoliageHeightOffsetrecord component.final inthashCode()Returns a hash code value for this object.pos()Returns the value of theposrecord component.intReturns the value of theradiusOffsetXZrecord component.intsizeX()Returns the value of thesizeXrecord component.intsizeZ()Returns the value of thesizeZrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
pos
The field for theposrecord component. -
radiusOffsetXZ
private final int radiusOffsetXZThe field for theradiusOffsetXZrecord component. -
foliageHeightOffset
private final int foliageHeightOffsetThe field for thefoliageHeightOffsetrecord component. -
sizeX
private final int sizeXThe field for thesizeXrecord component. -
sizeZ
private final int sizeZThe field for thesizeZrecord component.
-
-
Constructor Details
-
FoliageAttachment
-
FoliageAttachment
-
FoliageAttachment
public FoliageAttachment(BlockPos pos, int radiusOffsetXZ, int foliageHeightOffset, int sizeX, int sizeZ) Creates an instance of aFoliageAttachmentrecord class.- Parameters:
pos- the value for theposrecord componentradiusOffsetXZ- the value for theradiusOffsetXZrecord componentfoliageHeightOffset- the value for thefoliageHeightOffsetrecord componentsizeX- the value for thesizeXrecord componentsizeZ- the value for thesizeZrecord component
-
-
Method Details
-
doubleTrunk
public boolean doubleTrunk() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
radiusOffsetXZ
public int radiusOffsetXZ()Returns the value of theradiusOffsetXZrecord component.- Returns:
- the value of the
radiusOffsetXZrecord component
-
foliageHeightOffset
public int foliageHeightOffset()Returns the value of thefoliageHeightOffsetrecord component.- Returns:
- the value of the
foliageHeightOffsetrecord component
-
sizeX
public int sizeX()Returns the value of thesizeXrecord component.- Returns:
- the value of the
sizeXrecord component
-
sizeZ
public int sizeZ()Returns the value of thesizeZrecord component.- Returns:
- the value of the
sizeZrecord component
-