Package net.minecraft.world.level.timers
Record Class FunctionCallback
java.lang.Object
java.lang.Record
net.minecraft.world.level.timers.FunctionCallback
- All Implemented Interfaces:
TimerCallback<MinecraftServer>
public record FunctionCallback(ResourceLocation functionId)
extends Record
implements TimerCallback<MinecraftServer>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<FunctionCallback> private final ResourceLocation
The field for thefunctionId
record component. -
Constructor Summary
ConstructorsConstructorDescriptionFunctionCallback
(ResourceLocation functionId) Creates an instance of aFunctionCallback
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec
<FunctionCallback> codec()
final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefunctionId
record component.void
handle
(MinecraftServer p_82172_, TimerQueue<MinecraftServer> p_82173_, long p_82174_) final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
functionId
The field for thefunctionId
record component. -
CODEC
-
-
Constructor Details
-
FunctionCallback
Creates an instance of aFunctionCallback
record class.- Parameters:
functionId
- the value for thefunctionId
record component
-
-
Method Details
-
handle
- Specified by:
handle
in interfaceTimerCallback<MinecraftServer>
-
codec
- Specified by:
codec
in 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)
. -
functionId
Returns the value of thefunctionId
record component.- Returns:
- the value of the
functionId
record component
-