net.minecraftforge.fml.common.ModMetadata Java Examples

The following examples show how to use net.minecraftforge.fml.common.ModMetadata. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AddressHelper.java    From malmo with MIT License 6 votes vote down vote up
/** Set the actual port used for mission control - not persisted, could be different each time the Mod is run.
 * @param port the port currently in use for mission control.
 */
static public void setMissionControlPort(int port)
{
	if (port != AddressHelper.missionControlPort)
	{
		AddressHelper.missionControlPort = port;
		// Also update our metadata, for displaying to the user:
		ModMetadata md = Loader.instance().activeModContainer().getMetadata();
		if (port != -1)
			md.description = "Talk to this Mod using port " + TextFormatting.GREEN + port;
		else
			md.description = TextFormatting.RED + "ERROR: No mission control port - check configuration";

		// See if changing the port should lead to changing the login details:
		//AuthenticationHelper.update(MalmoMod.instance.getModPermanentConfigFile());
	}
}
 
Example #2
Source File: ModContainer.java    From AdvancedRocketry with MIT License 6 votes vote down vote up
public ModContainer()
{		
	super(new ModMetadata());
	
	System.out.println("********* CoreDummyContainer. OK");
	
	ModMetadata meta = getMetadata();
	
	meta.modId = "advancedrocketrycore";
	meta.name = "Advanced Rocketry Core";
	meta.version = "1";
	meta.credits = "Created by Zmaster587";
	meta.authorList = Arrays.asList("Zmaster587");
	meta.description = "ASM handler for AR";
	meta.url = "";
	meta.updateUrl = "";
	meta.screenshots = new String[0];
	meta.logoFile = "";
}
 
Example #3
Source File: NEIModContainer.java    From NotEnoughItems with MIT License 6 votes vote down vote up
@Override
public ModMetadata getMetadata() {
    String s_plugins = "";
    if (plugins.size() == 0) {
        s_plugins += EnumChatFormatting.RED+"No installed plugins.";
    } else {
        s_plugins += EnumChatFormatting.GREEN+"Installed plugins: ";
        for (int i = 0; i < plugins.size(); i++) {
            if (i > 0)
                s_plugins += ", ";
            IConfigureNEI plugin = plugins.get(i);
            s_plugins += plugin.getName() + " " + plugin.getVersion();
        }
        s_plugins += ".";
    }

    ModMetadata meta = super.getMetadata();
    meta.description = description.replace("<plugins>", s_plugins);
    return meta;
}
 
Example #4
Source File: FaweForge.java    From FastAsyncWorldedit with GNU General Public License v3.0 5 votes vote down vote up
public FaweForge(ForgeMain plugin, Logger logger, ModMetadata mod, File directory) {
    this.parent = plugin;
    this.logger = logger;
    this.directory = directory;
    this.mod = mod;
    try {
        Fawe.set(this);
        setupInjector();
    } catch (InstanceAlreadyExistsException e) {
        MainUtil.handleError(e);
    }
}
 
Example #5
Source File: FaweForge.java    From FastAsyncWorldedit with GNU General Public License v3.0 5 votes vote down vote up
public FaweForge(ForgeMain plugin, Logger logger, ModMetadata mod, File directory) {
    this.parent = plugin;
    this.logger = logger;
    this.directory = directory;
    this.mod = mod;
    try {
        Fawe.set(this);
        setupInjector();
    } catch (InstanceAlreadyExistsException e) {
        MainUtil.handleError(e);
    }
}
 
Example #6
Source File: FaweForge.java    From FastAsyncWorldedit with GNU General Public License v3.0 5 votes vote down vote up
public FaweForge(ForgeMain plugin, Logger logger, ModMetadata mod, File directory) {
    this.parent = plugin;
    this.logger = logger;
    this.directory = directory;
    this.mod = mod;
    try {
        Fawe.set(this);
        setupInjector();
    } catch (InstanceAlreadyExistsException e) {
        MainUtil.handleError(e);
    }
}
 
Example #7
Source File: FaweForge.java    From FastAsyncWorldedit with GNU General Public License v3.0 5 votes vote down vote up
public FaweForge(ForgeMain plugin, Logger logger, ModMetadata mod, File directory) {
    this.parent = plugin;
    this.logger = logger;
    this.directory = directory;
    this.mod = mod;
    try {
        Fawe.set(this);
        setupInjector();
    } catch (InstanceAlreadyExistsException e) {
        MainUtil.handleError(e);
    }
}
 
Example #8
Source File: FaweForge.java    From FastAsyncWorldedit with GNU General Public License v3.0 5 votes vote down vote up
public FaweForge(ForgeMain plugin, Logger logger, ModMetadata mod, File directory) {
    this.parent = plugin;
    this.logger = logger;
    this.directory = directory;
    this.mod = mod;
    try {
        Fawe.set(this);
        setupInjector();
    } catch (InstanceAlreadyExistsException e) {
        MainUtil.handleError(e);
    }
}
 
Example #9
Source File: TFC2Core.java    From TFC2 with GNU General Public License v3.0 5 votes vote down vote up
public TFC2Core()
{
	super(new ModMetadata());
	ModMetadata meta = getMetadata();
	meta.modId = "tfc2_coremod";
	meta.name = "TFC2[coremod]";
	meta.version = Reference.ModVersion;
	meta.credits = "";
	meta.authorList = Arrays.asList("Bioxx");
	meta.description = "";
	meta.url = "www.terrafirmacraft.com";
	meta.updateUrl = "";
	meta.screenshots = new String[0];
	meta.logoFile = "";
}
 
Example #10
Source File: GuiModListScroll.java    From CodeChickenCore with MIT License 5 votes vote down vote up
/**
 * Does not add the last 10 px space before the description normally starts
 * Ignores empty child mods expecting a background draw overwrite
 */
private static int calcDescY(GuiModList gui, ModContainer mod) {
    ModMetadata meta = mod.getMetadata();
    int y = 35;
    if(!!meta.logoFile.isEmpty() && ReflectionManager.getField(GuiModList.class, ResourceLocation.class, gui, "cachedLogo") != null)
        y += 65;
    y += 12; // title
    y += 40; // necessary lines
    if(!meta.credits.isEmpty())
        y += 10;
    if(!meta.childMods.isEmpty())
        y += 10;
    return y;
}
 
Example #11
Source File: VersionChecker.java    From LunatriusCore with MIT License 5 votes vote down vote up
public static void registerMod(final ModContainer container, final String forgeVersion) {
    REGISTERED_MODS.add(container);

    final ModMetadata metadata = container.getMetadata();
    if (metadata.description != null) {
        metadata.description += "\n---\nCompiled against Forge " + forgeVersion;
    }
}
 
Example #12
Source File: OpenModsCore.java    From OpenModsLib with MIT License 5 votes vote down vote up
public OpenModsCore() {
	super(new ModMetadata());
	ModMetadata meta = getMetadata();
	meta.modId = "openmodscore";
	meta.name = "OpenModsLib Core";
	meta.version = "$LIB-VERSION$";
	meta.authorList = Arrays.asList("Mikee", "NeverCast", "boq");
	meta.url = "https://openmods.info/";
	meta.description = "This is where the magic happens";
}
 
Example #13
Source File: NovaMinecraftPreloader.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
public NovaModContainer(ModMetadata meta, Class<?> mod) {
	super(meta);
	this.meta = meta;
	this.mod = mod;
}
 
Example #14
Source File: NovaMinecraftPreloader.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
public NovaModContainer(ModMetadata meta, Class<?> mod) {
	super(meta);
	this.mod = mod;
}