Class SetCooldownInteractionResult
java.lang.Object
com.pixelmonmod.pixelmon.api.npc.interaction.result.MutableInteractionResult
com.pixelmonmod.pixelmon.api.npc.interaction.result.type.time.SetCooldownInteractionResult
- All Implemented Interfaces:
InteractionResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SetCooldownInteractionResult>protected net.minecraft.resources.ResourceLocationprotected DataProvider<net.minecraft.server.level.ServerPlayer>Fields inherited from class com.pixelmonmod.pixelmon.api.npc.interaction.result.MutableInteractionResult
codec, constructor, inputTypes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSetCooldownInteractionResult(DataProvider<net.minecraft.server.level.ServerPlayer> player, net.minecraft.resources.ResourceLocation key) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<? extends InteractionResult>codec()The coded for decoding data for this interaction resultvoidhandle(InteractionContext context) Handles the result using the given contextstatic SetCooldownInteractionResultof(DataProvider<net.minecraft.server.level.ServerPlayer> player, net.minecraft.resources.ResourceLocation key) Methods inherited from class com.pixelmonmod.pixelmon.api.npc.interaction.result.MutableInteractionResult
fill, inputTypes, transformData, variableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pixelmonmod.pixelmon.api.npc.interaction.result.InteractionResult
canExecute
-
Field Details
-
CODEC
-
player
-
key
protected net.minecraft.resources.ResourceLocation key
-
-
Constructor Details
-
SetCooldownInteractionResult
protected SetCooldownInteractionResult(DataProvider<net.minecraft.server.level.ServerPlayer> player, net.minecraft.resources.ResourceLocation key)
-
-
Method Details
-
of
public static SetCooldownInteractionResult of(DataProvider<net.minecraft.server.level.ServerPlayer> player, net.minecraft.resources.ResourceLocation key) -
codec
Description copied from interface:InteractionResultThe coded for decoding data for this interaction result- Specified by:
codecin interfaceInteractionResult- Overrides:
codecin classMutableInteractionResult- Returns:
- The codec
-
handle
Description copied from interface:InteractionResultHandles the result using the given context- Parameters:
context- The context
-