Class ActionTag<T extends MCTag,U extends ITagManager<T>>

java.lang.Object
com.blamejared.crafttweaker.api.action.internal.CraftTweakerAction
com.blamejared.crafttweaker.api.action.tag.ActionTag<T,U>
All Implemented Interfaces:
IAction, IRuntimeAction
Direct Known Subclasses:
ActionKnownTag, ActionUnknownTag

public abstract class ActionTag<T extends MCTag,U extends ITagManager<T>> extends CraftTweakerAction implements IRuntimeAction
  • Constructor Details

    • ActionTag

      public ActionTag(T mcTag)
  • Method Details

    • manager

      public U manager()
    • getType

      public String getType()
    • makeHolder

      protected <V> net.minecraft.core.Holder<V> makeHolder(com.mojang.datafixers.util.Either<V,net.minecraft.resources.ResourceLocation> object)
    • id

      public net.minecraft.resources.ResourceLocation id()
    • mcTag

      public T mcTag()
    • validate

      public boolean validate(org.apache.logging.log4j.Logger logger)
      Description copied from interface: IAction
      Validates the action, ensuring no erroneous information is present.

      Implementations should validate all action information and log errors using the provided Logger if anything is incorrect. It is highly suggested to specify exactly what is wrong in the most precise yet brief way possible, to ensure script writers know why their actions are not being applied.

      If validation fails for whatever reason, IAction.apply() will not be called.

      Specified by:
      validate in interface IAction
      Parameters:
      logger - Logger object on which to log errors or warnings.
      Returns:
      Whether the action is valid (true) or not (false).