Package net.minecraft.world.level.timers
Record Class FunctionTagCallback
java.lang.Object
java.lang.Record
net.minecraft.world.level.timers.FunctionTagCallback
- All Implemented Interfaces:
TimerCallback<MinecraftServer>
public record FunctionTagCallback(ResourceLocation tagId)
extends Record
implements TimerCallback<MinecraftServer>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<FunctionTagCallback> private final ResourceLocationThe field for thetagIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aFunctionTagCallbackrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<FunctionTagCallback> codec()final booleanIndicates whether some other object is "equal to" this one.voidhandle(MinecraftServer obj, TimerQueue<MinecraftServer> manager, long gameTime) final inthashCode()Returns a hash code value for this object.tagId()Returns the value of thetagIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
tagId
The field for thetagIdrecord component. -
CODEC
-
-
Constructor Details
-
FunctionTagCallback
Creates an instance of aFunctionTagCallbackrecord class.- Parameters:
tagId- the value for thetagIdrecord component
-
-
Method Details
-
handle
- Specified by:
handlein interfaceTimerCallback<MinecraftServer>
-
codec
- Specified by:
codecin interfaceTimerCallback<MinecraftServer>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
tagId
Returns the value of thetagIdrecord component.- Returns:
- the value of the
tagIdrecord component
-