Class GiveItemInteractionResult

java.lang.Object
com.pixelmonmod.pixelmon.api.npc.interaction.result.ImmutableInteractionResult
com.pixelmonmod.pixelmon.api.npc.interaction.result.type.GiveItemInteractionResult
All Implemented Interfaces:
InteractionResult

public class GiveItemInteractionResult extends ImmutableInteractionResult
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<GiveItemInteractionResult> CODEC
    • items

      protected final List<net.minecraft.world.item.ItemStack> items
  • Constructor Details

    • GiveItemInteractionResult

      protected GiveItemInteractionResult(List<net.minecraft.world.item.ItemStack> items)
  • Method Details

    • of

      public static GiveItemInteractionResult of(net.minecraft.world.item.ItemStack... items)
    • of

      public static GiveItemInteractionResult of(List<net.minecraft.world.item.ItemStack> items)
    • handle

      public void handle(InteractionContext context)
      Description copied from interface: InteractionResult
      Handles the result using the given context
      Parameters:
      context - The context
    • canExecute

      public boolean canExecute(InteractionContext context)
      Description copied from interface: InteractionResult
      Checks if the interaction can be executed
      Parameters:
      context - The context
      Returns:
      If the interaction can be executed