Class ActivateAltarTrigger
java.lang.Object
net.minecraft.advancements.criterion.SimpleCriterionTrigger<ActivateAltarTrigger.Conditions>
johnsmith.enchantingoverhauled.advancement.ActivateAltarTrigger
- All Implemented Interfaces:
net.minecraft.advancements.CriterionTrigger<ActivateAltarTrigger.Conditions>
public class ActivateAltarTrigger
extends net.minecraft.advancements.criterion.SimpleCriterionTrigger<ActivateAltarTrigger.Conditions>
A custom advancement trigger that fires when a player activates an Enchanting Altar.
This trigger corresponds to the enchanting_overhauled:activate_altar criterion ID.
It uses the vanilla SimpleCriterionTrigger system to handle player progress.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDefines the conditions required to trigger this advancement.Nested classes/interfaces inherited from class net.minecraft.advancements.criterion.SimpleCriterionTrigger
net.minecraft.advancements.criterion.SimpleCriterionTrigger.SimpleInstanceNested classes/interfaces inherited from interface net.minecraft.advancements.CriterionTrigger
net.minecraft.advancements.CriterionTrigger.Listener<T extends net.minecraft.advancements.CriterionTriggerInstance> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull com.mojang.serialization.Codec<ActivateAltarTrigger.Conditions> codec()Gets the codec used to serialize and deserialize the conditions for this trigger.voidtrigger(net.minecraft.server.level.ServerPlayer player) Triggers the advancement criterion for the specified player.Methods inherited from class net.minecraft.advancements.criterion.SimpleCriterionTrigger
addPlayerListener, removePlayerListener, removePlayerListeners, triggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.advancements.CriterionTrigger
createCriterion
-
Constructor Details
-
ActivateAltarTrigger
public ActivateAltarTrigger()
-
-
Method Details
-
trigger
public void trigger(net.minecraft.server.level.ServerPlayer player) Triggers the advancement criterion for the specified player.- Parameters:
player- The player who activated the altar.
-
codec
Gets the codec used to serialize and deserialize the conditions for this trigger.- Returns:
- The conditions' codec.
-