Class BasicModClass

java.lang.Object
io.github.vampirestudios.vampirelib.api.BasicModClass
All Implemented Interfaces:
net.fabricmc.api.ClientModInitializer, net.fabricmc.api.ModInitializer
Direct Known Subclasses:
VampireLib, VampireLibClient

@EnvironmentInterfaces(@EnvironmentInterface(value=CLIENT,itf=net.fabricmc.api.ClientModInitializer.class)) public abstract class BasicModClass extends Object implements net.fabricmc.api.ModInitializer, net.fabricmc.api.ClientModInitializer
  • Field Details

  • Constructor Details

    • BasicModClass

      protected BasicModClass(BasicModClass basicModClass, boolean client)
      Creates a copy of the $BasicModClass given and defines if it's client-side or not.
      Parameters:
      basicModClass - another instance of this class
      client - if this is client-side or not
    • BasicModClass

      protected BasicModClass(String modName, String modVersion)
      Creates a new instance of this class with client set to false.
      Parameters:
      modName - the name of this mod
      modVersion - the version of this mod
    • BasicModClass

      protected BasicModClass(String modId, String modName, String modVersion)
      Creates a new instance of this class with client set to false.
      Parameters:
      modId - the mod id of this mod
      modName - the name of this mod
      modVersion - the version of this mod
    • BasicModClass

      protected BasicModClass(String modName, String modVersion, boolean client)
      Creates a new instance of this class with mod id being the lowercase version of the name.
      Parameters:
      modName - the name of this mod
      modVersion - the version of this mod
      client - if this is client-side or not
    • BasicModClass

      protected BasicModClass(String modId, String modName, String modVersion, boolean client)
      Creates a new instance of this class.
      Parameters:
      modId - the mod id of this mod
      modName - the name of this mod
      modVersion - the version of this mod
      client - if this is client-side or not
  • Method Details

    • createConfig

      public void createConfig(Class<? extends CustomConfig> config)
      Creates a new config for this mod with the specified config class.
      Parameters:
      config - the class of the config that will be used
    • getConfig

      public me.shedaniel.autoconfig.ConfigHolder<? extends CustomConfig> getConfig()
      Returns:
      an instance of this mod's config.
    • identifier

      public net.minecraft.resources.ResourceLocation identifier(String path)
      Creates an $ResourceLocation with the specified and path and the mod id of the mod.
      Parameters:
      path - the path for this resource location
      Returns:
      a new $ResourceLocation with the specified and path and the mod id of the mod
    • identifier

      public net.minecraft.resources.ResourceLocation identifier(String namespace, String path)
      Creates an $ResourceLocation with the specified namespace and path.
      Parameters:
      namespace - the namespace for this resource location
      path - the path for this resource location
      Returns:
      a new $ResourceLocation with the specified namespace and path
    • registerFeatures

      public void registerFeatures()
      Registers the common features.
    • registerFeaturesClient

      @Environment(CLIENT) public void registerFeaturesClient()
      Registers the client features.
    • registerFeaturesServer

      @Environment(SERVER) public void registerFeaturesServer()
      Registers the server features.
    • commonPostRegisterFeatures

      public void commonPostRegisterFeatures()
      Initializes the common.
    • clientPostRegisterFeatures

      @Environment(CLIENT) public void clientPostRegisterFeatures()
      Initializes the client features.
    • serverPostRegisterFeatures

      @Environment(SERVER) public void serverPostRegisterFeatures()
      Initializes the server features.
    • featureManager

      public FeatureManager featureManager()
    • getLogger

      public org.slf4j.Logger getLogger()
      Returns:
      the logger for this instance of the mod
    • modId

      public String modId()
      Returns:
      the mod id of the mod
    • modName

      public String modName()
      Returns:
      the name of the mod
    • modVersion

      public String modVersion()
      Returns:
      the version of the mod
    • shouldNotPrintVersionMessage

      public void shouldNotPrintVersionMessage()
      Makes it so the default version info does not get printed.
    • onInitialize

      public void onInitialize()
      Specified by:
      onInitialize in interface net.fabricmc.api.ModInitializer
    • onInitializeClient

      @Environment(CLIENT) public void onInitializeClient()
      Specified by:
      onInitializeClient in interface net.fabricmc.api.ClientModInitializer