Class SimpleCriterionTrigger<T extends AbstractCriterionTriggerInstance>
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
,ItemInteractWithBlockTrigger
,KilledByCrossbowTrigger
,KilledTrigger
,LevitationTrigger
,LightningStrikeTrigger
,LootTableTrigger
,PickedUpItemTrigger
,PlacedBlockTrigger
,PlayerHurtEntityTrigger
,PlayerInteractTrigger
,PlayerTrigger
,RecipeUnlockedTrigger
,ShotCrossbowTrigger
,SlideDownBlockTrigger
,StartRidingTrigger
,SummonedEntityTrigger
,TameAnimalTrigger
,TargetBlockTrigger
,TradeTrigger
,UsedEnderEyeTrigger
,UsedTotemTrigger
,UsingItemTrigger
public abstract class SimpleCriterionTrigger<T extends AbstractCriterionTriggerInstance>
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_) final T
createInstance
(com.google.gson.JsonObject p_66246_, DeserializationContext p_66247_) protected abstract T
createInstance
(com.google.gson.JsonObject p_66248_, EntityPredicate.Composite p_66249_, DeserializationContext p_66250_) 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
getId
-
Field Details
-
players
private final Map<PlayerAdvancements,Set<CriterionTrigger.Listener<T extends AbstractCriterionTriggerInstance>>> 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 AbstractCriterionTriggerInstance>
-
removePlayerListener
public final void removePlayerListener(PlayerAdvancements p_66254_, CriterionTrigger.Listener<T> p_66255_) - Specified by:
removePlayerListener
in interfaceCriterionTrigger<T extends AbstractCriterionTriggerInstance>
-
removePlayerListeners
- Specified by:
removePlayerListeners
in interfaceCriterionTrigger<T extends AbstractCriterionTriggerInstance>
-
createInstance
protected abstract T createInstance(com.google.gson.JsonObject p_66248_, EntityPredicate.Composite p_66249_, DeserializationContext p_66250_) -
createInstance
- Specified by:
createInstance
in interfaceCriterionTrigger<T extends AbstractCriterionTriggerInstance>
-
trigger
-