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 Details

  • Method Details

    • codec

      com.mojang.serialization.Codec<? extends InteractionResult> codec()
      The coded for decoding data for this interaction result
      Returns:
      The codec
    • handle

      void handle(InteractionContext context)
      Handles the result using the given context
      Parameters:
      context - The context
    • canExecute

      default boolean canExecute(InteractionContext context)
      Checks if the interaction can be executed
      Parameters:
      context - The context
      Returns:
      If the interaction can be executed
    • fill

      default InteractionResult fill(ResultData data)
    • inputTypes

      default List<InputType<?>> inputTypes()
    • from

      @Internal static InteractionResult from(ResultData data)
      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