Class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance>
java.lang.Object
net.minecraft.advancements.critereon.SimpleCriterionTrigger<T>
- All Implemented Interfaces:
CriterionTrigger<T>
- Direct Known Subclasses:
BeeNestDestroyedTrigger
,BredAnimalsTrigger
,BrewedPotionTrigger
,ChangeDimensionTrigger
,ChanneledLightningTrigger
,ConstructBeaconTrigger
,ConsumeItemTrigger
,CuredZombieVillagerTrigger
,DistanceTrigger
,EffectsChangedTrigger
,EnchantedItemTrigger
,EnterBlockTrigger
,EntityHurtPlayerTrigger
,FilledBucketTrigger
,FishingRodHookedTrigger
,InventoryChangeTrigger
,ItemDurabilityTrigger
,ItemUsedOnLocationTrigger
,KilledByCrossbowTrigger
,KilledTrigger
,LevitationTrigger
,LightningStrikeTrigger
,LootTableTrigger
,PickedUpItemTrigger
,PlayerHurtEntityTrigger
,PlayerInteractTrigger
,PlayerTrigger
,RecipeCraftedTrigger
,RecipeUnlockedTrigger
,ShotCrossbowTrigger
,SlideDownBlockTrigger
,StartRidingTrigger
,SummonedEntityTrigger
,TameAnimalTrigger
,TargetBlockTrigger
,TradeTrigger
,UsedEnderEyeTrigger
,UsedTotemTrigger
,UsingItemTrigger
public abstract class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance>
extends Object
implements CriterionTrigger<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.advancements.CriterionTrigger
CriterionTrigger.Listener<T extends CriterionTriggerInstance>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<PlayerAdvancements,
Set<CriterionTrigger.Listener<T>>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addPlayerListener
(PlayerAdvancements p_66243_, CriterionTrigger.Listener<T> p_66244_) protected abstract T
createInstance
(com.google.gson.JsonObject p_66248_, Optional<ContextAwarePredicate> p_297533_, DeserializationContext p_66250_) final T
createInstance
(com.google.gson.JsonObject p_66246_, DeserializationContext p_66247_) final void
removePlayerListener
(PlayerAdvancements p_66254_, CriterionTrigger.Listener<T> p_66255_) final void
removePlayerListeners
(PlayerAdvancements p_66241_) protected void
trigger
(ServerPlayer p_66235_, Predicate<T> p_66236_) 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.CriterionTrigger
createCriterion
-
Field Details
-
players
private final Map<PlayerAdvancements,Set<CriterionTrigger.Listener<T extends SimpleCriterionTrigger.SimpleInstance>>> players
-
-
Constructor Details
-
SimpleCriterionTrigger
public SimpleCriterionTrigger()
-
-
Method Details
-
addPlayerListener
public final void addPlayerListener(PlayerAdvancements p_66243_, CriterionTrigger.Listener<T> p_66244_) - Specified by:
addPlayerListener
in interfaceCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance>
-
removePlayerListener
public final void removePlayerListener(PlayerAdvancements p_66254_, CriterionTrigger.Listener<T> p_66255_) - Specified by:
removePlayerListener
in interfaceCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance>
-
removePlayerListeners
- Specified by:
removePlayerListeners
in interfaceCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance>
-
createInstance
protected abstract T createInstance(com.google.gson.JsonObject p_66248_, Optional<ContextAwarePredicate> p_297533_, DeserializationContext p_66250_) -
createInstance
- Specified by:
createInstance
in interfaceCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance>
-
trigger
-