Skip to content

Commit

Permalink
add mod info
Browse files Browse the repository at this point in the history
  • Loading branch information
asbyth committed Mar 2, 2020
1 parent 1083b85 commit 1fa8f6b
Show file tree
Hide file tree
Showing 9 changed files with 645 additions and 610 deletions.
1 change: 1 addition & 0 deletions mod_info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>Create a trailing effect to make things appear smoother. Originally by <a href="https://2pi.pw/mods/motionblur">2Pi</a></p>
4 changes: 4 additions & 0 deletions sk1er_mod.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mod_id=motionblurmod
display_name=Motion Blur
not_complete=false
hide=false
127 changes: 60 additions & 67 deletions src/main/java/club/sk1er/modcore/FMLLoadingPlugin.java
Original file line number Diff line number Diff line change
@@ -1,84 +1,77 @@
package club.sk1er.modcore;

import java.util.Map;
import net.minecraft.launchwrapper.Launch;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;

import java.util.Map;

@IFMLLoadingPlugin.MCVersion(ForgeVersion.mcVersion)
public class FMLLoadingPlugin implements IFMLLoadingPlugin {
/**
* Return a list of classes that implements the IClassTransformer interface
*
* @return a list of classes that implements the IClassTransformer interface
*/
@Override
public String[] getASMTransformerClass() {
int initialize = ModCoreInstaller.initialize(Launch.minecraftHome, "1.8.9");

if (ModCoreInstaller.isErrored() || initialize != 0 && initialize != -1) {
// Technically wouldn't happen in simulated installed but is important for actual impl
System.out.println("Failed to load Sk1er Modcore - " + initialize + " - " + ModCoreInstaller.getError());
}

// If true the classes are loaded
if (ModCoreInstaller.isIsRunningModCore()) {
return new String[]{"club.sk1er.mods.core.forge.ClassTransformer"};
}
/**
* Return a list of classes that implements the IClassTransformer interface
*
* @return a list of classes that implements the IClassTransformer interface
*/
@Override
public String[] getASMTransformerClass() {
int initialize = ModCoreInstaller.initialize(Launch.minecraftHome, "1.8.9");

return new String[]{};
if (ModCoreInstaller.isErrored() || initialize != 0 && initialize != -1) {
// Technically wouldn't happen in simulated installed but is important for actual impl
System.out.println(
"Failed to load Sk1er Modcore - " + initialize + " - " + ModCoreInstaller.getError());
}

/**
* Return a class name that implements "ModContainer" for injection into the mod list
* The "getName" function should return a name that other mods can, if need be,
* depend on.
* Trivially, this modcontainer will be loaded before all regular mod containers,
* which means it will be forced to be "immutable" - not susceptible to normal
* sorting behaviour.
* All other mod behaviours are available however- this container can receive and handle
* normal loading events
*/
@Override
public String getModContainerClass() {
return null;
// If true the classes are loaded
if (ModCoreInstaller.isIsRunningModCore()) {
return new String[] {"club.sk1er.mods.core.forge.ClassTransformer"};
}

/**
* Return the class name of an implementor of "IFMLCallHook", that will be run, in the
* main thread, to perform any additional setup this coremod may require. It will be
* run <strong>prior</strong> to Minecraft starting, so it CANNOT operate on minecraft
* itself. The game will deliberately crash if this code is detected to trigger a
* minecraft class loading (TODO: implement crash ;) )
*/
@Override
public String getSetupClass() {
return null;
}
return new String[] {};
}

/**
* Inject coremod data into this coremod
* This data includes:
* "mcLocation" : the location of the minecraft directory,
* "coremodList" : the list of coremods
* "coremodLocation" : the file this coremod loaded from,
*
* @param data
*/
@Override
public void injectData(Map<String, Object> data) {
/**
* Return a class name that implements "ModContainer" for injection into the mod list The
* "getName" function should return a name that other mods can, if need be, depend on. Trivially,
* this modcontainer will be loaded before all regular mod containers, which means it will be
* forced to be "immutable" - not susceptible to normal sorting behaviour. All other mod
* behaviours are available however- this container can receive and handle normal loading events
*/
@Override
public String getModContainerClass() {
return null;
}

}
/**
* Return the class name of an implementor of "IFMLCallHook", that will be run, in the main
* thread, to perform any additional setup this coremod may require. It will be run
* <strong>prior</strong> to Minecraft starting, so it CANNOT operate on minecraft itself. The
* game will deliberately crash if this code is detected to trigger a minecraft class loading
* (TODO: implement crash ;) )
*/
@Override
public String getSetupClass() {
return null;
}

/**
* Return an optional access transformer class for this coremod. It will be injected post-deobf
* so ensure your ATs conform to the new srgnames scheme.
*
* @return the name of an access transformer class or null if none is provided
*/
@Override
public String getAccessTransformerClass() {
return null;
}
/**
* Inject coremod data into this coremod This data includes: "mcLocation" : the location of the
* minecraft directory, "coremodList" : the list of coremods "coremodLocation" : the file this
* coremod loaded from,
*
* @param data
*/
@Override
public void injectData(Map<String, Object> data) {}

/**
* Return an optional access transformer class for this coremod. It will be injected post-deobf so
* ensure your ATs conform to the new srgnames scheme.
*
* @return the name of an access transformer class or null if none is provided
*/
@Override
public String getAccessTransformerClass() {
return null;
}
}
Loading

0 comments on commit 1fa8f6b

Please sign in to comment.