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 SummaryNested classes/interfaces inherited from interface net.minecraft.server.level.ChunkTrackingViewChunkTrackingView.Positioned
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ChunkPosThe field for thecenterrecord component.private final intThe field for theviewDistancerecord component.Fields inherited from interface net.minecraft.server.level.ChunkTrackingViewEMPTY
- 
Constructor SummaryConstructorsConstructorDescriptionPositioned(ChunkPos center, int viewDistance) Creates an instance of aPositionedrecord class.
- 
Method SummaryModifier 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.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.server.level.ChunkTrackingViewcontains, contains, isInViewDistance
- 
Field Details- 
centerThe field for thecenterrecord component.
- 
viewDistanceprivate final int viewDistanceThe field for theviewDistancerecord component.
 
- 
- 
Constructor Details- 
PositionedCreates an instance of aPositionedrecord class.- Parameters:
- center- the value for the- centerrecord component
- viewDistance- the value for the- viewDistancerecord component
 
 
- 
- 
Method Details- 
minXint minX()
- 
minZint minZ()
- 
maxXint maxX()
- 
maxZint maxZ()
- 
squareIntersects
- 
containspublic boolean contains(int p_295177_, int p_294248_, boolean p_294703_) - Specified by:
- containsin interface- ChunkTrackingView
 
- 
forEach- Specified by:
- forEachin interface- ChunkTrackingView
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
centerReturns the value of thecenterrecord component.- Returns:
- the value of the centerrecord component
 
- 
viewDistancepublic int viewDistance()Returns the value of theviewDistancerecord component.- Returns:
- the value of the viewDistancerecord component
 
 
-