Record Class DensityVolume
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.DensityVolume
public record DensityVolume(int sizeX, int sizeY, int sizeZ, int minBlockX, int minBlockY, int minBlockZ, int stepBlockX, int stepBlockY, int stepBlockZ)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theminBlockXrecord component.private final intThe field for theminBlockYrecord component.private final intThe field for theminBlockZrecord component.static final intprivate final intThe field for thesizeXrecord component.private final intThe field for thesizeYrecord component.private final intThe field for thesizeZrecord component.private final intThe field for thestepBlockXrecord component.private final intThe field for thestepBlockYrecord component.private final intThe field for thestepBlockZrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDensityVolume(int sizeX, int sizeY, int sizeZ, int minBlockX, int minBlockY, int minBlockZ) DensityVolume(int sizeX, int sizeY, int sizeZ, int minBlockX, int minBlockY, int minBlockZ, int stepBlockX, int stepBlockY, int stepBlockZ) Creates an instance of aDensityVolumerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintblockX(int x) intblockY(int y) intblockZ(int z) private booleancontainsBlockRelative(int relativeX, int relativeY, int relativeZ) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindexOfBlock(int blockX, int blockY, int blockZ) intindexUnchecked(int indexX, int indexY, int indexZ) booleanintersects(BoundingBox box) intintintintReturns the value of theminBlockXrecord component.intReturns the value of theminBlockYrecord component.intReturns the value of theminBlockZrecord component.intsize()intsizeX()Returns the value of thesizeXrecord component.intsizeY()Returns the value of thesizeYrecord component.intsizeZ()Returns the value of thesizeZrecord component.intReturns the value of thestepBlockXrecord component.intReturns the value of thestepBlockYrecord component.intReturns the value of thestepBlockZrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sizeX
private final int sizeXThe field for thesizeXrecord component. -
sizeY
private final int sizeYThe field for thesizeYrecord component. -
sizeZ
private final int sizeZThe field for thesizeZrecord component. -
minBlockX
private final int minBlockXThe field for theminBlockXrecord component. -
minBlockY
private final int minBlockYThe field for theminBlockYrecord component. -
minBlockZ
private final int minBlockZThe field for theminBlockZrecord component. -
stepBlockX
private final int stepBlockXThe field for thestepBlockXrecord component. -
stepBlockY
private final int stepBlockYThe field for thestepBlockYrecord component. -
stepBlockZ
private final int stepBlockZThe field for thestepBlockZrecord component. -
NO_BLOCK
public static final int NO_BLOCK- See Also:
-
-
Constructor Details
-
DensityVolume
public DensityVolume(int sizeX, int sizeY, int sizeZ, int minBlockX, int minBlockY, int minBlockZ, int stepBlockX, int stepBlockY, int stepBlockZ) Creates an instance of aDensityVolumerecord class.- Parameters:
sizeX- the value for thesizeXrecord componentsizeY- the value for thesizeYrecord componentsizeZ- the value for thesizeZrecord componentminBlockX- the value for theminBlockXrecord componentminBlockY- the value for theminBlockYrecord componentminBlockZ- the value for theminBlockZrecord componentstepBlockX- the value for thestepBlockXrecord componentstepBlockY- the value for thestepBlockYrecord componentstepBlockZ- the value for thestepBlockZrecord component
-
DensityVolume
public DensityVolume(int sizeX, int sizeY, int sizeZ, int minBlockX, int minBlockY, int minBlockZ)
-
-
Method Details
-
indexUnchecked
public int indexUnchecked(int indexX, int indexY, int indexZ) -
blockX
public int blockX(int x) -
blockY
public int blockY(int y) -
blockZ
public int blockZ(int z) -
maxBlockX
public int maxBlockX() -
maxBlockY
public int maxBlockY() -
maxBlockZ
public int maxBlockZ() -
size
public int size() -
intersects
-
containsBlockRelative
private boolean containsBlockRelative(int relativeX, int relativeY, int relativeZ) -
indexOfBlock
public int indexOfBlock(int blockX, int blockY, int blockZ) -
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 with thecomparemethod from their corresponding wrapper classes. -
sizeX
public int sizeX()Returns the value of thesizeXrecord component.- Returns:
- the value of the
sizeXrecord component
-
sizeY
public int sizeY()Returns the value of thesizeYrecord component.- Returns:
- the value of the
sizeYrecord component
-
sizeZ
public int sizeZ()Returns the value of thesizeZrecord component.- Returns:
- the value of the
sizeZrecord component
-
minBlockX
public int minBlockX()Returns the value of theminBlockXrecord component.- Returns:
- the value of the
minBlockXrecord component
-
minBlockY
public int minBlockY()Returns the value of theminBlockYrecord component.- Returns:
- the value of the
minBlockYrecord component
-
minBlockZ
public int minBlockZ()Returns the value of theminBlockZrecord component.- Returns:
- the value of the
minBlockZrecord component
-
stepBlockX
public int stepBlockX()Returns the value of thestepBlockXrecord component.- Returns:
- the value of the
stepBlockXrecord component
-
stepBlockY
public int stepBlockY()Returns the value of thestepBlockYrecord component.- Returns:
- the value of the
stepBlockYrecord component
-
stepBlockZ
public int stepBlockZ()Returns the value of thestepBlockZrecord component.- Returns:
- the value of the
stepBlockZrecord component
-