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 Classes
    Modifier and Type
    Class
    Description
    static final record 
    Defines the conditions required to trigger this advancement.

    Nested classes/interfaces inherited from class net.minecraft.advancements.criterion.SimpleCriterionTrigger

    net.minecraft.advancements.criterion.SimpleCriterionTrigger.SimpleInstance

    Nested classes/interfaces inherited from interface net.minecraft.advancements.CriterionTrigger

    net.minecraft.advancements.CriterionTrigger.Listener<T extends net.minecraft.advancements.CriterionTriggerInstance>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull com.mojang.serialization.Codec<ActivateAltarTrigger.Conditions>
    Gets the codec used to serialize and deserialize the conditions for this trigger.
    void
    trigger(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, trigger

    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
  • 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

      @NotNull public @NotNull com.mojang.serialization.Codec<ActivateAltarTrigger.Conditions> codec()
      Gets the codec used to serialize and deserialize the conditions for this trigger.
      Returns:
      The conditions' codec.