Class AbstractCriterionTrigger<T extends CriterionInstance>
java.lang.Object
net.minecraft.advancements.criterion.AbstractCriterionTrigger<T>
- All Implemented Interfaces:
ICriterionTrigger<T>
- Direct Known Subclasses:
BeeNestDestroyedTrigger
,BredAnimalsTrigger
,BrewedPotionTrigger
,ChangeDimensionTrigger
,ChanneledLightningTrigger
,ConstructBeaconTrigger
,ConsumeItemTrigger
,CuredZombieVillagerTrigger
,EffectsChangedTrigger
,EnchantedItemTrigger
,EnterBlockTrigger
,EntityHurtPlayerTrigger
,FilledBucketTrigger
,FishingRodHookedTrigger
,InventoryChangeTrigger
,ItemDurabilityTrigger
,KilledByCrossbowTrigger
,KilledTrigger
,LevitationTrigger
,NetherTravelTrigger
,PlacedBlockTrigger
,PlayerEntityInteractionTrigger
,PlayerGeneratesContainerLootTrigger
,PlayerHurtEntityTrigger
,PositionTrigger
,RecipeUnlockedTrigger
,RightClickBlockWithItemTrigger
,ShotCrossbowTrigger
,SlideDownBlockTrigger
,SummonedEntityTrigger
,TameAnimalTrigger
,TargetHitTrigger
,ThrownItemPickedUpByEntityTrigger
,TickTrigger
,UsedEnderEyeTrigger
,UsedTotemTrigger
,VillagerTradeTrigger
public abstract class AbstractCriterionTrigger<T extends CriterionInstance>
extends Object
implements ICriterionTrigger<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.advancements.ICriterionTrigger
ICriterionTrigger.Listener<T extends ICriterionInstance>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<PlayerAdvancements,
Set<ICriterionTrigger.Listener<T>>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addPlayerListener
(PlayerAdvancements p_192165_1_, ICriterionTrigger.Listener<T> p_192165_2_) protected abstract T
createInstance
(com.google.gson.JsonObject p_230241_1_, EntityPredicate.AndPredicate p_230241_2_, ConditionArrayParser p_230241_3_) final T
createInstance
(com.google.gson.JsonObject p_230307_1_, ConditionArrayParser p_230307_2_) final void
removePlayerListener
(PlayerAdvancements p_192164_1_, ICriterionTrigger.Listener<T> p_192164_2_) final void
removePlayerListeners
(PlayerAdvancements p_192167_1_) protected void
trigger
(ServerPlayerEntity p_235959_1_, Predicate<T> p_235959_2_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.advancements.ICriterionTrigger
getId
-
Field Details
-
players
private final Map<PlayerAdvancements,Set<ICriterionTrigger.Listener<T extends CriterionInstance>>> players
-
-
Constructor Details
-
AbstractCriterionTrigger
public AbstractCriterionTrigger()
-
-
Method Details
-
addPlayerListener
public final void addPlayerListener(PlayerAdvancements p_192165_1_, ICriterionTrigger.Listener<T> p_192165_2_) - Specified by:
addPlayerListener
in interfaceICriterionTrigger<T extends CriterionInstance>
-
removePlayerListener
public final void removePlayerListener(PlayerAdvancements p_192164_1_, ICriterionTrigger.Listener<T> p_192164_2_) - Specified by:
removePlayerListener
in interfaceICriterionTrigger<T extends CriterionInstance>
-
removePlayerListeners
- Specified by:
removePlayerListeners
in interfaceICriterionTrigger<T extends CriterionInstance>
-
createInstance
protected abstract T createInstance(com.google.gson.JsonObject p_230241_1_, EntityPredicate.AndPredicate p_230241_2_, ConditionArrayParser p_230241_3_) -
createInstance
public final T createInstance(com.google.gson.JsonObject p_230307_1_, ConditionArrayParser p_230307_2_) - Specified by:
createInstance
in interfaceICriterionTrigger<T extends CriterionInstance>
-
trigger
-