Interface InteractionEventLogic
- All Known Implementing Classes:
ActivateShrineInteractionEventLogic
,BattleThrowPokeBallInteractionEventLogic
,BreakBlockInteractionEventLogic
,CapturePokemonInteractionEventLogic
,ChangeDimensionInteractionEventLogic
,CraftItemInteractionEventLogic
,DefeatRaidInteractionEventLogic
,DefeatTrainerInteractionEventLogic
,DynamaxInteractionEventLogic
,EatCakeInteractionEventLogic
,EmptyInteractionEvent
,EnterWildBattleInteractionEventLogic
,EvolvePokemonInteractionEventLogic
,FillShrineOrbInteractionEventLogic
,FindStructureInteractionEventLogic
,FirstJoinInteractionEventLogic
,GigantamaxInteractionEventLogic
,HarvestCropInteractionEventLogic
,HatchEggInteractionEventLogic
,HitWithPokeBallInteractionEventLogic
,JoinInteractionEventLogic
,KnockoutPokemonInteractionEventLogic
,LeftClickEntityInteractionEventLogic
,LevelPokemonInteractionEventLogic
,ListeningEventLogic
,MegaEvolveInteractionEventLogic
,OpenGiftInteractionEventLogic
,PickApricornInteractionEventLogic
,PickBerryInteractionEventLogic
,PickUpItemInteractionEventLogic
,PlayerTickInteractionEventLogic
,PokedexPokemonInteractionEventLogic
,PokemonDropItemInteractionEventLogic
,RaidDropItemInteractionEventLogic
,ReleasePokemonInteractionEventLogic
,RightClickEntityInteractionEventLogic
,SelectStarterInteractionEventLogic
,SpinPokeStopInteractionEventLogic
,TradePokemonInteractionEventLogic
,UltraBurstInteractionEventLogic
,UseBattleItemInteractionEventLogic
,UseLureInteractionEventLogic
This represents an entry point for the NPC logic flow.
Implementations of this class should not dictate when the logic executes, just pass the relevant context through to listeners using
All contexts should be created using the
} as it
provides a set of default contexts from the
To register interaction event logic look at the
Implementations of this class should not dictate when the logic executes, just pass the relevant context through to listeners using
ListeningEventLogic
All contexts should be created using the
invalid @link
{@link this#createContext(Entity)
NPC
that will likely be used
later in the control flow.
To register interaction event logic look at the
PixelmonRegistry
class.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<InteractionEventLogic> -
Method Summary
Modifier and TypeMethodDescriptiondefault void
addListener
(Predicate<StoredContext> listener) Adds a listener to this interaction event logic.com.mojang.serialization.MapCodec
<? extends InteractionEventLogic> codec()
The codec for this interaction event logic.default StoredContext
createContext
(net.minecraft.world.entity.Entity entity) Creates a basicStoredContext
using the provided entityInteractionEventType
<? extends InteractionEventLogic> type()
The type of this interaction event logic.
-
Field Details
-
CODEC
-
-
Method Details
-
type
InteractionEventType<? extends InteractionEventLogic> type()The type of this interaction event logic.- Returns:
- the type of this interaction event logic
-
codec
com.mojang.serialization.MapCodec<? extends InteractionEventLogic> codec()The codec for this interaction event logic.- Returns:
- the codec for this interaction event logic
-
addListener
Adds a listener to this interaction event logic.- Parameters:
listener
- the listener to add
-
createContext
Creates a basicStoredContext
using the provided entity- Parameters:
entity
- the entity- Returns:
- the created context
-