Example addon for Project SUIM demonstrating all available hooks and APIs. This requires SUIM in your mods folder (obviously)
Join the discord for support!
We want them! open a PR at our parent repo Project SUIM and edit the MyauMappings.java with your mappings
Don't want to share them? - map them internally in your own mod in e.g. MyProjectNameMappings.java in a package.
Updating SUIM mappings (e.g. in an update or for beta) is completely possible!
public class MappingPatcher {
public static void patch(String fieldName, String newValue) {
try {
Field field = MyauMappings.class.getDeclaredField(fieldName);
field.setAccessible(true);
// Remove final modifier
Field modifiers = Field.class.getDeclaredField("modifiers");
modifiers.setAccessible(true);
modifiers.setInt(field, field.getModifiers() & ~java.lang.reflect.Modifier.FINAL);
field.set(null, newValue);
} catch (Exception e) {
System.err.println("[MyAddon] Failed to patch " + fieldName + ": " + e.getMessage());
}
}
}// e.g.
MappingPatcher.patch("METHOD_GET_MODULE", "L");
// This would change the original SUIM mapping
public static final String METHOD_GET_MODULE = "h";
// to
public static final String METHOD_GET_MODULE = "L";
// Affect won't change much however - due to how mixins work we have to call static FINAL not STATIC - meaning MyauMappings.METHOD_X is already baked in has h on runtime - this isnt a perfect solution - pr smth on SUIM if you actually need to update mappings and need a mappingUpdater xD.xample— Hello, World!.xample origins— Show all module origins.xample info— Show addon info and hooks used.xamplemod— Show XampleModule status.xamplemod greet— Send greeting with current settings
This project is licensed under the GNU General Public License v3.0.