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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBasicModClass(BasicModClass basicModClass, boolean client) Creates a copy of the $BasicModClassgiven and defines if it's client-side or not.protectedBasicModClass(String modName, String modVersion) Creates a new instance of this class with client set to false.protectedBasicModClass(String modName, String modVersion, boolean client) Creates a new instance of this class with mod id being the lowercase version of the name.protectedBasicModClass(String modId, String modName, String modVersion) Creates a new instance of this class with client set to false.protectedBasicModClass(String modId, String modName, String modVersion, boolean client) Creates a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionvoidInitializes the client features.voidInitializes the common.voidcreateConfig(Class<? extends CustomConfig> config) Creates a new config for this mod with the specified config class.me.shedaniel.autoconfig.ConfigHolder<? extends CustomConfig>org.slf4j.Loggernet.minecraft.resources.ResourceLocationidentifier(String path) Creates an $ResourceLocationwith the specified and path and the mod id of the mod.net.minecraft.resources.ResourceLocationidentifier(String namespace, String path) Creates an $ResourceLocationwith the specified namespace and path.modId()modName()voidvoidvoidRegisters the common features.voidRegisters the client features.voidRegisters the server features.voidInitializes the server features.voidMakes it so the default version info does not get printed.
-
Field Details
-
featureManager
-
-
Constructor Details
-
BasicModClass
Creates a copy of the $BasicModClassgiven and defines if it's client-side or not.- Parameters:
basicModClass- another instance of this classclient- if this is client-side or not
-
BasicModClass
Creates a new instance of this class with client set to false.- Parameters:
modName- the name of this modmodVersion- the version of this mod
-
BasicModClass
Creates a new instance of this class with client set to false.- Parameters:
modId- the mod id of this modmodName- the name of this modmodVersion- the version of this mod
-
BasicModClass
Creates a new instance of this class with mod id being the lowercase version of the name.- Parameters:
modName- the name of this modmodVersion- the version of this modclient- if this is client-side or not
-
BasicModClass
Creates a new instance of this class.- Parameters:
modId- the mod id of this modmodName- the name of this modmodVersion- the version of this modclient- if this is client-side or not
-
-
Method Details
-
createConfig
Creates a new config for this mod with the specified config class.- Parameters:
config- the class of the config that will be used
-
getConfig
- Returns:
- an instance of this mod's config.
-
identifier
Creates an $ResourceLocationwith the specified and path and the mod id of the mod.- Parameters:
path- the path for this resource location- Returns:
- a new $
ResourceLocationwith the specified and path and the mod id of the mod
-
identifier
Creates an $ResourceLocationwith the specified namespace and path.- Parameters:
namespace- the namespace for this resource locationpath- the path for this resource location- Returns:
- a new $
ResourceLocationwith 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
-
getLogger
public org.slf4j.Logger getLogger()- Returns:
- the logger for this instance of the mod
-
modId
- Returns:
- the mod id of the mod
-
modName
- Returns:
- the name of the mod
-
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:
onInitializein interfacenet.fabricmc.api.ModInitializer
-
onInitializeClient
@Environment(CLIENT) public void onInitializeClient()- Specified by:
onInitializeClientin interfacenet.fabricmc.api.ClientModInitializer
-