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