Skip to content

A simple FML coremod that makes it easy to override Vanilla classes completely

Notifications You must be signed in to change notification settings

FunnyMan3595/AutoOverride

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AutoOverride is a simple FML coremod that makes it easy to override Vanilla
Minecraft classes entirely.

This can and will happily break other coremods or direct minecraft.jar
modifications, so beware conflicts with things like Optifine.


Usage:

This is a mod directory designed for use with mcp_deobfuscate and its
mcp_interface.  It can be used without, but mcp_interface is recommended.

See https://github.com/FunnyMan3595/mcp_deobfuscate/blob/master/README
and https://github.com/FunnyMan3595/mcp_deobfuscate/blob/mcp_interface/README.txt
for more details.



NOTE: In the instructions below:
      * Paths starting with ./ refer to the same directory this file is in.
        For example commands, I'll call the directory "ao_git".
      * Paths starting with $MCP refer to the root directory of your MCP
        installation.
        For example commands, I'll call this directory "mcp".
      * For example commands, I will call your project "GenericMod".
      * Example commands start with $, and should run in any Linux shell.




To use WITH mcp_interface:
* Install this directory in $MCP/mods/
* Edit ./conf/PROJECT_NAME to contain your mod's name.
* Edit ./conf/JAVA_PACKAGE, and set it to a suitable java package name.
  (e.g. "genericmod"; multi-level names like "com.genericmod" may not work.)
* You may want to edit conf/VERSION as well, so that your coremod doesn't
  default to version "alpha".
* Place the modified Minecraft source file(s) in src/common/net/minecraft/src/.
* Run recompile_mods, fix any errors, and repeat until there are none.
* Your completed coremod will now be in $MCP/packages/.


To use WITHOUT mcp_interface:
* Copy ./src/common/{conf:JAVA_PACKAGE} to $MCP/src/common/YOURMOD,
  renaming appropriately.
  $ cp -r 'ao_git/src/common/{conf:JAVA_PACKAGE}' mcp/src/common/GenericMod
  (Note the quotes here!  {} doesn't play nicely with most shells.)
* Edit $MCP/src/common/$YOURMOD/AutoOverride.java, and replace each:
  %conf:JAVA_PACKAGE%
  with $YOURMOD (e.g. GenericMod)
* Edit ./resources/common/META-INF/MANIFEST.MF and replace likewise.
* Run recompile and reobfuscate.
* Create a zipfile contaiing:
  AUTOOVERRIDE_LICENSE                  (from ./resources/common/)
  META-INF/MANIFEST.MF                  (from ./resources/common/)
  $YOURMOD/*                            (from $MCP/reobf/minecraft/)
  Any class files you want to overwrite (from $MCP/reobf/minecraft/)

  $ pushd ao_git/resources/common/  # This is like cd
  $ zip -r ../../../GenericMod-alpha.zip .
  $ popd # This returns us to where we were when we ran pushd.
  $ pushd mcp/reobf/minecraft/
  $ zip -r ../../../GenericMod-alpha.zip GenericMod/ omg.class wtf.class
  $ popd
* Rename the zipfile to have a .jar extension.
  $ mv GenericMod-alpha.zip GenericMod-alpha.jar
  (And don't complain to me.  I tried: https://github.com/cpw/FML/pull/124)
* You now have a coremod.

About

A simple FML coremod that makes it easy to override Vanilla classes completely

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages