Class InteractionEvent
java.lang.Object
com.pixelmonmod.pixelmon.api.npc.interaction.event.InteractionEvent
This represents the entry point for all interaction pipelines in Pixelmon.
These are created by datapack, and reference
If you use an
These are created by datapack, and reference
InteractionEventLogic to determine how the interaction
is triggerred.
If you use an
EmptyInteractionEvent then you will need to trigger the interaction manually using
trigger(StoredContext).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<InteractionEvent>> static final com.mojang.serialization.Codec<InteractionEvent> static final com.mojang.serialization.Codec<List<net.minecraft.resources.ResourceKey<InteractionEvent>>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateContext(net.minecraft.world.entity.Entity entity) Creates a basicStoredContextusing the provided entitybooleantrigger(StoredContext context) Triggers the interaction using the provided context for the NPC found in the context
-
Field Details
-
DIRECT_CODEC
-
CODEC
public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<InteractionEvent>> CODEC -
RESOURCE_KEY_LIST_CODEC
public static final com.mojang.serialization.Codec<List<net.minecraft.resources.ResourceKey<InteractionEvent>>> RESOURCE_KEY_LIST_CODEC
-
-
Constructor Details
-
InteractionEvent
-
-
Method Details
-
trigger
Triggers the interaction using the provided context for the NPC found in the context- Parameters:
context- The interaction context
-
createContext
Creates a basicStoredContextusing the provided entity- Parameters:
entity- the entity- Returns:
- the created context
-