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 java.lang.Object implements ICriterionTrigger<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.minecraft.advancements.ICriterionTrigger
ICriterionTrigger.Listener<T extends ICriterionInstance>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<PlayerAdvancements,java.util.Set<ICriterionTrigger.Listener<T>>>
players
-
Constructor Summary
Constructors Constructor Description AbstractCriterionTrigger()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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_)
T
createInstance(com.google.gson.JsonObject p_230307_1_, ConditionArrayParser p_230307_2_)
void
removePlayerListener(PlayerAdvancements p_192164_1_, ICriterionTrigger.Listener<T> p_192164_2_)
void
removePlayerListeners(PlayerAdvancements p_192167_1_)
protected void
trigger(ServerPlayerEntity p_235959_1_, java.util.function.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 Detail
-
players
private final java.util.Map<PlayerAdvancements,java.util.Set<ICriterionTrigger.Listener<T extends CriterionInstance>>> players
-
-
Method Detail
-
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
public final void removePlayerListeners(PlayerAdvancements p_192167_1_)
- 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
protected void trigger(ServerPlayerEntity p_235959_1_, java.util.function.Predicate<T> p_235959_2_)
-
-