Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

So I am experimenting with writing coremods, and I can't seem to figure out how to get it to run ingame after I've deobfuscated it. I have the following files:

GenericLoadingPlugin.java:

package gaga.generic;

import java.util.Map;

import cpw.mods.fml.relauncher.IFMLLoadingPlugin;

public class GenericLoadingPlugin implements IFMLLoadingPlugin {

@Override
public String[] getLibraryRequestClass() {
	return null;
}

@Override
public String[] getASMTransformerClass() {
	return new String[]{GenericClassTransformer.class.getName()};
}

@Override
public String getModContainerClass() {
	return GenericCore.class.getName();
}

@Override
public String getSetupClass() {
	return null;
}

@Override
public void injectData(Map<String, Object> data) {

}

}

 

GenericCore.java:

package gaga.generic;


import java.util.Arrays;

import com.google.common.eventbus.EventBus;

import cpw.mods.fml.common.DummyModContainer;
import cpw.mods.fml.common.LoadController;
import cpw.mods.fml.common.ModMetadata;

public class GenericCore extends DummyModContainer {

public GenericCore() {
	super(new ModMetadata());
	ModMetadata md = getMetadata();
	md.modId = "genericModCore";
	md.name = "Generic mod Core";
	md.version = "0.0.0";
	md.credits = "Roll Credits ...";
	md.authorList = Arrays.asList("gaga654");
	md.description = "";
	md.url = "";
	md.updateUrl = "";
	md.screenshots = new String[0];
	md.logoFile = "";
}

@Override
public boolean registerBus(EventBus bus, LoadController controller) {
	bus.register(this);
	return true;
}
}

 

And, finally, in the .zip file with the reobfuscated files, I have a META-INF folder with a MANIFEST.MF file which has the following:

Manifest-Version: 1.0
FMLCorePlugin: gaga.generic.GenericLoadingPlugin

 

It works fine when I run it in the development environment, but when I try to test the reobfuscated version it just doesn't even appear in the mods list. Any suggestions as to what's wrong?

  • Author

Okay, I tried making it into a jar file, but it is not acting any different from before.

  • Author

Well, I managed to solve the problem. The solution was to add a blank line to the end of the MANIFEST.MF file...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.