Package net.minecraft.server.level
Record Class ChunkTrackingView.Positioned
java.lang.Object
java.lang.Record
net.minecraft.server.level.ChunkTrackingView.Positioned
- All Implemented Interfaces:
ChunkTrackingView
- Enclosing interface:
ChunkTrackingView
public static record ChunkTrackingView.Positioned(ChunkPos center, int viewDistance)
extends Record
implements ChunkTrackingView
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.level.ChunkTrackingView
ChunkTrackingView.Positioned -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChunkPosThe field for thecenterrecord component.private final intThe field for theviewDistancerecord component.Fields inherited from interface net.minecraft.server.level.ChunkTrackingView
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionPositioned(ChunkPos center, int viewDistance) Creates an instance of aPositionedrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncenter()Returns the value of thecenterrecord component.booleancontains(int p_295177_, int p_294248_, boolean p_294703_) final booleanIndicates whether some other object is "equal to" this one.voidfinal inthashCode()Returns a hash code value for this object.(package private) intmaxX()(package private) intmaxZ()(package private) intminX()(package private) intminZ()protected booleansquareIntersects(ChunkTrackingView.Positioned p_295100_) final StringtoString()Returns a string representation of this record class.intReturns the value of theviewDistancerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.server.level.ChunkTrackingView
contains, contains, isInViewDistance
-
Field Details
-
center
The field for thecenterrecord component. -
viewDistance
private final int viewDistanceThe field for theviewDistancerecord component.
-
-
Constructor Details
-
Positioned
Creates an instance of aPositionedrecord class.- Parameters:
center- the value for thecenterrecord componentviewDistance- the value for theviewDistancerecord component
-
-
Method Details
-
minX
int minX() -
minZ
int minZ() -
maxX
int maxX() -
maxZ
int maxZ() -
squareIntersects
-
contains
public boolean contains(int p_295177_, int p_294248_, boolean p_294703_) - Specified by:
containsin interfaceChunkTrackingView
-
forEach
- Specified by:
forEachin interfaceChunkTrackingView
-
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 '=='. -
center
Returns the value of thecenterrecord component.- Returns:
- the value of the
centerrecord component
-
viewDistance
public int viewDistance()Returns the value of theviewDistancerecord component.- Returns:
- the value of the
viewDistancerecord component
-