Interface InteractionResult
- All Known Implementing Classes:
AppraiseRodInteractionResult
,BuildableInteractionResult
,CloseScreenInteractionResult
,ConsoleExecuteCommandInteractionResult
,DelayInteractionResult
,EmptyInteractionResult
,GiveExperienceInteractionResult
,GiveItemInteractionResult
,GiveMoneyInteractionResult
,GivePokemonInteractionResult
,HealPlayerPartyInteractionResult
,ImmutableInteractionResult
,MessagePlayerInteractionResult
,MessageSpawnLocationInteractionResult
,MutableInteractionResult
,OpenDialogueInteractionResult
,OpenPagedDialogueInteractionResult
,OpenProfessorDialogueInteractionResult
,OpenShopInteractionResult
,OpenTradeInteractionResult
,PlayerExecuteCommandInteractionResult
,PlayerStartNPCBattleInteractionResult
,PokedexSeenInteractionResult
,RelearnerInteractionResult
,RewardLootTableInteractionResult
,SetCooldownInteractionResult
,SetIconInteractionResult
,SpawnAndEnterBattleInteractionResult
,TriggerInteractionEventInteractionResult
,TutorInteractionResult
,UnlockDynamaxInteractionResult
,UnlockMegaEvolutionInteractionResult
public interface InteractionResult
Interaction results represent a function to execute once the
relevant event has been fired, and then all additional
conditions have been met
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a new builder for an interaction resultdefault boolean
canExecute
(InteractionContext context) Checks if the interaction can be executedcom.mojang.serialization.Codec<? extends InteractionResult>
codec()
The coded for decoding data for this interaction resultdefault InteractionResult
fill
(ResultData data) static InteractionResult
from
(ResultData data) Converts the network data into an interaction conditionvoid
handle
(InteractionContext context) Handles the result using the given context
-
Field Details
-
CODEC
-
-
Method Details
-
codec
com.mojang.serialization.Codec<? extends InteractionResult> codec()The coded for decoding data for this interaction result- Returns:
- The codec
-
handle
Handles the result using the given context- Parameters:
context
- The context
-
canExecute
Checks if the interaction can be executed- Parameters:
context
- The context- Returns:
- If the interaction can be executed
-
fill
-
inputTypes
-
from
Converts the network data into an interaction condition- Parameters:
data
- The network data- Returns:
- The interaction condition
-
builder
Creates a new builder for an interaction result- Returns:
- The builder
-