public class FMLModContainer extends java.lang.Object implements ModContainer
ModContainer.Disableable| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
annotationDependencies |
private ModCandidate |
candidate |
private java.security.cert.Certificate |
certificate |
private java.lang.String |
className |
private int |
classVersion |
private LoadController |
controller |
private java.util.Map<java.lang.String,java.lang.String> |
customModProperties |
private java.util.Map<java.lang.String,java.lang.Object> |
descriptor |
private ModContainer.Disableable |
disableability |
private boolean |
enabled |
private com.google.common.eventbus.EventBus |
eventBus |
private com.google.common.collect.ListMultimap<java.lang.Class<? extends FMLEvent>,java.lang.reflect.Method> |
eventMethods |
private boolean |
fingerprintNotPresent |
private java.lang.String |
internalVersion |
private ILanguageAdapter |
languageAdapter |
private VersionRange |
minecraftAccepted |
private java.lang.Object |
modInstance |
private java.lang.String |
modLanguage |
private ModMetadata |
modMetadata |
private boolean |
overridesMetadata |
private DefaultArtifactVersion |
processedVersion |
private java.io.File |
source |
private java.util.Set<java.lang.String> |
sourceFingerprints |
private java.net.URL |
updateJSONUrl |
EMPTY_PROPERTIES| Constructor and Description |
|---|
FMLModContainer(java.lang.String className,
ModCandidate container,
java.util.Map<java.lang.String,java.lang.Object> modDescriptor) |
| Modifier and Type | Method and Description |
|---|---|
VersionRange |
acceptableMinecraftVersionRange() |
void |
bindMetadata(MetadataCollection mc)
Attach this mod to it's metadata from the supplied metadata collection
|
ModContainer.Disableable |
canBeDisabled() |
void |
constructMod(FMLConstructionEvent event) |
private java.lang.reflect.Method |
gatherAnnotations(java.lang.Class<?> clazz) |
int |
getClassVersion() |
java.util.Map<java.lang.String,java.lang.String> |
getCustomModProperties() |
java.lang.Class<?> |
getCustomResourcePackClass() |
java.util.List<ArtifactVersion> |
getDependants()
A list of modids that should be loaded after this one.
|
java.util.List<ArtifactVersion> |
getDependencies()
A list of modids that should be loaded prior to this one.
|
java.lang.String |
getDisplayVersion() |
java.lang.String |
getGuiClassName() |
private ILanguageAdapter |
getLanguageAdapter() |
ModMetadata |
getMetadata()
The metadata for this mod
|
java.lang.Object |
getMod()
Get the actual mod object
|
java.lang.String |
getModId()
The globally unique modid for this mod
|
java.lang.String |
getName()
A human readable name
|
java.util.List<java.lang.String> |
getOwnedPackages() |
ArtifactVersion |
getProcessedVersion() |
java.util.Set<ArtifactVersion> |
getRequirements()
A list of the modids that this mod requires loaded prior to loading
|
java.util.Map<java.lang.String,java.lang.String> |
getSharedModDescriptor() |
java.security.cert.Certificate |
getSigningCertificate() |
java.lang.String |
getSortingRules()
A representative string encapsulating the sorting preferences for this
mod
|
java.io.File |
getSource()
The location on the file system which this mod came from
|
java.net.URL |
getUpdateUrl() |
java.lang.String |
getVersion()
A human readable version identifier
|
void |
handleModStateEvent(FMLEvent event) |
boolean |
isImmutable() |
private boolean |
isTrue(java.lang.Boolean value) |
boolean |
matches(java.lang.Object mod)
Does this mod match the supplied mod
|
private void |
parseSimpleFieldAnnotation(com.google.common.collect.SetMultimap<java.lang.String,ASMDataTable.ASMData> annotations,
java.lang.String annotationClassName,
java.util.function.Function<ModContainer,java.lang.Object> retriever) |
private void |
processFieldAnnotations(ASMDataTable asmDataTable) |
boolean |
registerBus(com.google.common.eventbus.EventBus bus,
LoadController controller)
Register the event bus for the mod and the controller for error handling
Returns if this bus was successfully registered - disabled mods and other
mods that don't need real events should return false and avoid further
processing
|
private void |
sanityCheckModId() |
java.util.Properties |
searchForVersionProperties() |
void |
setClassVersion(int classVersion) |
void |
setEnabledState(boolean enabled)
Set the enabled/disabled state of this mod
|
boolean |
shouldLoadInEnvironment() |
java.lang.String |
toString() |
private java.lang.Object modInstance
private java.io.File source
private ModMetadata modMetadata
private java.lang.String className
private java.util.Map<java.lang.String,java.lang.Object> descriptor
private boolean enabled
private java.lang.String internalVersion
private boolean overridesMetadata
private com.google.common.eventbus.EventBus eventBus
private LoadController controller
private DefaultArtifactVersion processedVersion
private java.lang.String annotationDependencies
private VersionRange minecraftAccepted
private boolean fingerprintNotPresent
private java.util.Set<java.lang.String> sourceFingerprints
private java.security.cert.Certificate certificate
private java.lang.String modLanguage
private ILanguageAdapter languageAdapter
private ModContainer.Disableable disableability
private com.google.common.collect.ListMultimap<java.lang.Class<? extends FMLEvent>,java.lang.reflect.Method> eventMethods
private java.util.Map<java.lang.String,java.lang.String> customModProperties
private ModCandidate candidate
private java.net.URL updateJSONUrl
private int classVersion
public FMLModContainer(java.lang.String className,
ModCandidate container,
java.util.Map<java.lang.String,java.lang.Object> modDescriptor)
private void sanityCheckModId()
private ILanguageAdapter getLanguageAdapter()
public java.lang.String getModId()
ModContainergetModId in interface ModContainerpublic java.lang.String getName()
ModContainergetName in interface ModContainerpublic java.lang.String getVersion()
ModContainergetVersion in interface ModContainerpublic java.io.File getSource()
ModContainergetSource in interface ModContainerpublic ModMetadata getMetadata()
ModContainergetMetadata in interface ModContainerpublic void bindMetadata(MetadataCollection mc)
ModContainerbindMetadata in interface ModContainer@Nullable public java.util.Properties searchForVersionProperties()
public void setEnabledState(boolean enabled)
ModContainersetEnabledState in interface ModContainerpublic java.util.Set<ArtifactVersion> getRequirements()
ModContainergetRequirements in interface ModContainerpublic java.util.List<ArtifactVersion> getDependencies()
ModContainergetDependencies in interface ModContainerpublic java.util.List<ArtifactVersion> getDependants()
ModContainergetDependants in interface ModContainerpublic java.lang.String getSortingRules()
ModContainergetSortingRules in interface ModContainerpublic boolean matches(java.lang.Object mod)
ModContainermatches in interface ModContainerpublic java.lang.Object getMod()
ModContainergetMod in interface ModContainerpublic boolean registerBus(com.google.common.eventbus.EventBus bus,
LoadController controller)
ModContainerregisterBus in interface ModContainer@Nullable private java.lang.reflect.Method gatherAnnotations(java.lang.Class<?> clazz)
private void processFieldAnnotations(ASMDataTable asmDataTable) throws java.lang.IllegalAccessException
java.lang.IllegalAccessExceptionprivate void parseSimpleFieldAnnotation(com.google.common.collect.SetMultimap<java.lang.String,ASMDataTable.ASMData> annotations, java.lang.String annotationClassName, java.util.function.Function<ModContainer,java.lang.Object> retriever) throws java.lang.IllegalAccessException
java.lang.IllegalAccessExceptionpublic void constructMod(FMLConstructionEvent event)
public void handleModStateEvent(FMLEvent event)
public ArtifactVersion getProcessedVersion()
getProcessedVersion in interface ModContainerpublic boolean isImmutable()
isImmutable in interface ModContainerpublic java.lang.String getDisplayVersion()
getDisplayVersion in interface ModContainerpublic VersionRange acceptableMinecraftVersionRange()
acceptableMinecraftVersionRange in interface ModContainerpublic java.security.cert.Certificate getSigningCertificate()
getSigningCertificate in interface ModContainerpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Map<java.lang.String,java.lang.String> getCustomModProperties()
getCustomModProperties in interface ModContainerpublic java.lang.Class<?> getCustomResourcePackClass()
getCustomResourcePackClass in interface ModContainerpublic java.util.Map<java.lang.String,java.lang.String> getSharedModDescriptor()
getSharedModDescriptor in interface ModContainerpublic ModContainer.Disableable canBeDisabled()
canBeDisabled in interface ModContainerpublic java.lang.String getGuiClassName()
getGuiClassName in interface ModContainerpublic java.util.List<java.lang.String> getOwnedPackages()
getOwnedPackages in interface ModContainerprivate boolean isTrue(java.lang.Boolean value)
public boolean shouldLoadInEnvironment()
shouldLoadInEnvironment in interface ModContainerpublic java.net.URL getUpdateUrl()
getUpdateUrl in interface ModContainerpublic void setClassVersion(int classVersion)
setClassVersion in interface ModContainerpublic int getClassVersion()
getClassVersion in interface ModContainer