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 ResourceLocationThe field for thefunctionIdrecord component. - 
Constructor Summary
ConstructorsConstructorDescriptionFunctionCallback(ResourceLocation 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 pObj, TimerQueue<MinecraftServer> pManager, long pGameTime) 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
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 thefunctionIdrecord component.- Returns:
 - the value of the 
functionIdrecord component 
 
 -