Class McbsGoalType<T extends McbsGoal>

java.lang.Object
com.thecsdev.betterstats.api.mcbs.model.goal.McbsGoalType<T>
Type Parameters:
T - The McbsGoal type.

public abstract class McbsGoalType<T extends McbsGoal> extends Object
Represents a type of McbsGoal. Holds information about a given type, and a Codec for serializing and deserializing instances of that Class.
  • Field Details

  • Constructor Details

  • Method Details

    • getBaseClass

      @NotNull public final @NotNull Class<T> getBaseClass()
      Returns the Class of the McbsGoal this McbsGoalType represents.
    • getKey

      @Nullable public final @Nullable net.minecraft.resources.Identifier getKey()
      Returns the Identifier key for this McbsGoalType in the BRegistries.GOAL_TYPE registry, or null if this McbsGoalType is not registered.
    • getCodec

      @NotNull public abstract @NotNull com.mojang.serialization.MapCodec<T> getCodec()
      Returns the Codec used for serializing and deserializing McbsGoals of this McbsGoalType.
    • getName

      @Virtual @NotNull public @NotNull net.minecraft.network.chat.Component getName()
      Returns the user-friendly display name for this McbsGoalType. This is the general name for the type of goal itself, that applies to all corresponding McbsGoal instances.
      See Also:
    • create

      @Contract("-> new") @NotNull public abstract T create()
      Creates an McbsGoal instance for this McbsGoalType, with default configurations (where any apply).