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
Modifier and TypeFieldDescriptionprivate final ChunkPos
The field for thecenter
record component.private final int
The field for theviewDistance
record component.Fields inherited from interface net.minecraft.server.level.ChunkTrackingView
EMPTY
-
Constructor Summary
ConstructorDescriptionPositioned
(ChunkPos center, int viewDistance) Creates an instance of aPositioned
record class. -
Method Summary
Modifier and TypeMethodDescriptioncenter()
Returns the value of thecenter
record component.boolean
contains
(int p_297345_, int p_300837_, boolean p_298477_) final boolean
Indicates whether some other object is "equal to" this one.void
final int
hashCode()
Returns a hash code value for this object.(package private) int
maxX()
(package private) int
maxZ()
(package private) int
minX()
(package private) int
minZ()
protected boolean
squareIntersects
(ChunkTrackingView.Positioned p_300776_) final String
toString()
Returns a string representation of this record class.int
Returns the value of theviewDistance
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.server.level.ChunkTrackingView
contains, contains, isInViewDistance
-
Field Details
-
center
The field for thecenter
record component. -
viewDistance
private final int viewDistanceThe field for theviewDistance
record component.
-
-
Constructor Details
-
Positioned
Creates an instance of aPositioned
record class.- Parameters:
center
- the value for thecenter
record componentviewDistance
- the value for theviewDistance
record component
-
-
Method Details
-
minX
int minX() -
minZ
int minZ() -
maxX
int maxX() -
maxZ
int maxZ() -
squareIntersects
-
contains
public boolean contains(int p_297345_, int p_300837_, boolean p_298477_) - Specified by:
contains
in interfaceChunkTrackingView
-
forEach
- Specified by:
forEach
in 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 thecenter
record component.- Returns:
- the value of the
center
record component
-
viewDistance
public int viewDistance()Returns the value of theviewDistance
record component.- Returns:
- the value of the
viewDistance
record component
-