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
,EffectsChangedTrigger
,EnchantedItemTrigger
,EnterBlockTrigger
,EntityHurtPlayerTrigger
,FilledBucketTrigger
,FishingRodHookedTrigger
,InventoryChangeTrigger
,ItemDurabilityTrigger
,ItemPickedUpByEntityTrigger
,ItemUsedOnBlockTrigger
,KilledByCrossbowTrigger
,KilledTrigger
,LevitationTrigger
,LightningStrikeTrigger
,LocationTrigger
,LootTableTrigger
,NetherTravelTrigger
,PlacedBlockTrigger
,PlayerHurtEntityTrigger
,PlayerInteractTrigger
,RecipeUnlockedTrigger
,ShotCrossbowTrigger
,SlideDownBlockTrigger
,StartRidingTrigger
,SummonedEntityTrigger
,TameAnimalTrigger
,TargetBlockTrigger
,TickTrigger
,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 Map<PlayerAdvancements,Set<CriterionTrigger.Listener<T>>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlayerListener(PlayerAdvancements p_66243_, CriterionTrigger.Listener<T> p_66244_)
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_)
void
removePlayerListener(PlayerAdvancements p_66254_, CriterionTrigger.Listener<T> p_66255_)
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
public final T createInstance(com.google.gson.JsonObject p_66246_, DeserializationContext p_66247_)- Specified by:
createInstance
in interfaceCriterionTrigger<T extends AbstractCriterionTriggerInstance>
-
trigger
-