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()
ModContainer
getModId
in interface ModContainer
public java.lang.String getName()
ModContainer
getName
in interface ModContainer
public java.lang.String getVersion()
ModContainer
getVersion
in interface ModContainer
public java.io.File getSource()
ModContainer
getSource
in interface ModContainer
public ModMetadata getMetadata()
ModContainer
getMetadata
in interface ModContainer
public void bindMetadata(MetadataCollection mc)
ModContainer
bindMetadata
in interface ModContainer
@Nullable public java.util.Properties searchForVersionProperties()
public void setEnabledState(boolean enabled)
ModContainer
setEnabledState
in interface ModContainer
public java.util.Set<ArtifactVersion> getRequirements()
ModContainer
getRequirements
in interface ModContainer
public java.util.List<ArtifactVersion> getDependencies()
ModContainer
getDependencies
in interface ModContainer
public java.util.List<ArtifactVersion> getDependants()
ModContainer
getDependants
in interface ModContainer
public java.lang.String getSortingRules()
ModContainer
getSortingRules
in interface ModContainer
public boolean matches(java.lang.Object mod)
ModContainer
matches
in interface ModContainer
public java.lang.Object getMod()
ModContainer
getMod
in interface ModContainer
public boolean registerBus(com.google.common.eventbus.EventBus bus, LoadController controller)
ModContainer
registerBus
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.IllegalAccessException
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) throws java.lang.IllegalAccessException
java.lang.IllegalAccessException
public void constructMod(FMLConstructionEvent event)
public void handleModStateEvent(FMLEvent event)
public ArtifactVersion getProcessedVersion()
getProcessedVersion
in interface ModContainer
public boolean isImmutable()
isImmutable
in interface ModContainer
public java.lang.String getDisplayVersion()
getDisplayVersion
in interface ModContainer
public VersionRange acceptableMinecraftVersionRange()
acceptableMinecraftVersionRange
in interface ModContainer
public java.security.cert.Certificate getSigningCertificate()
getSigningCertificate
in interface ModContainer
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map<java.lang.String,java.lang.String> getCustomModProperties()
getCustomModProperties
in interface ModContainer
public java.lang.Class<?> getCustomResourcePackClass()
getCustomResourcePackClass
in interface ModContainer
public java.util.Map<java.lang.String,java.lang.String> getSharedModDescriptor()
getSharedModDescriptor
in interface ModContainer
public ModContainer.Disableable canBeDisabled()
canBeDisabled
in interface ModContainer
public java.lang.String getGuiClassName()
getGuiClassName
in interface ModContainer
public java.util.List<java.lang.String> getOwnedPackages()
getOwnedPackages
in interface ModContainer
private boolean isTrue(java.lang.Boolean value)
public boolean shouldLoadInEnvironment()
shouldLoadInEnvironment
in interface ModContainer
public java.net.URL getUpdateUrl()
getUpdateUrl
in interface ModContainer
public void setClassVersion(int classVersion)
setClassVersion
in interface ModContainer
public int getClassVersion()
getClassVersion
in interface ModContainer