Record Class LodestoneTracker
java.lang.Object
java.lang.Record
net.minecraft.world.item.component.LodestoneTracker
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<LodestoneTracker> static final StreamCodec<io.netty.buffer.ByteBuf, LodestoneTracker> The field for thetargetrecord component.private final booleanThe field for thetrackedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLodestoneTracker(Optional<GlobalPos> target, boolean tracked) Creates an instance of aLodestoneTrackerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.target()Returns the value of thetargetrecord component.tick(ServerLevel level) final StringtoString()Returns a string representation of this record class.booleantracked()Returns the value of thetrackedrecord component.
-
Field Details
-
target
-
tracked
private final boolean trackedThe field for thetrackedrecord component. -
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
LodestoneTracker
-
-
Method Details
-
tick
-
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. -
target
-
tracked
public boolean tracked()Returns the value of thetrackedrecord component.- Returns:
- the value of the
trackedrecord component
-