Update coremods and spi, include mandatory license field in metadata. Added at top level of mods.toml file.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
parent
532d153d33
commit
97dfcbc52b
|
@ -448,8 +448,8 @@ project(':forge') {
|
||||||
installer 'cpw.mods:grossjava9hacks:1.3.+'
|
installer 'cpw.mods:grossjava9hacks:1.3.+'
|
||||||
installer 'net.minecraftforge:accesstransformers:2.2.+:shadowed'
|
installer 'net.minecraftforge:accesstransformers:2.2.+:shadowed'
|
||||||
installer 'net.minecraftforge:eventbus:3.0.+:service'
|
installer 'net.minecraftforge:eventbus:3.0.+:service'
|
||||||
installer 'net.minecraftforge:forgespi:3.0.+'
|
installer 'net.minecraftforge:forgespi:3.1.+'
|
||||||
installer 'net.minecraftforge:coremods:2.0.+'
|
installer 'net.minecraftforge:coremods:3.0.+'
|
||||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||||
installer 'com.electronwill.night-config:core:3.6.2'
|
installer 'com.electronwill.night-config:core:3.6.2'
|
||||||
installer 'com.electronwill.night-config:toml:3.6.2'
|
installer 'com.electronwill.night-config:toml:3.6.2'
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
modLoader="javafml" #mandatory
|
modLoader="javafml" #mandatory
|
||||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||||
loaderVersion="[32,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
loaderVersion="[32,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||||
|
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties
|
||||||
|
license="CHOOSE YOUR LICENSE"
|
||||||
# A URL to refer people to when problems occur with this mod
|
# A URL to refer people to when problems occur with this mod
|
||||||
issueTrackerURL="http://my.issue.tracker/" #optional
|
issueTrackerURL="http://my.issue.tracker/" #optional
|
||||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||||
|
|
|
@ -51,16 +51,19 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
|
||||||
private final boolean showAsResourcePack;
|
private final boolean showAsResourcePack;
|
||||||
private final List<IModInfo> mods;
|
private final List<IModInfo> mods;
|
||||||
private final Map<String,Object> properties;
|
private final Map<String,Object> properties;
|
||||||
|
private final String license;
|
||||||
|
|
||||||
ModFileInfo(final ModFile modFile, final IConfigurable config)
|
ModFileInfo(final ModFile modFile, final IConfigurable config)
|
||||||
{
|
{
|
||||||
this.modFile = modFile;
|
this.modFile = modFile;
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.modLoader = config.<String>getConfigElement("modLoader").
|
this.modLoader = config.<String>getConfigElement("modLoader")
|
||||||
orElseThrow(()->new InvalidModFileException("Missing ModLoader in file", this));
|
.orElseThrow(()->new InvalidModFileException("Missing ModLoader in file", this));
|
||||||
this.modLoaderVersion = config.<String>getConfigElement("loaderVersion").
|
this.modLoaderVersion = config.<String>getConfigElement("loaderVersion")
|
||||||
map(MavenVersionAdapter::createFromVersionSpec).
|
.map(MavenVersionAdapter::createFromVersionSpec)
|
||||||
orElseThrow(()->new InvalidModFileException("Missing ModLoader version in file", this));
|
.orElseThrow(()->new InvalidModFileException("Missing ModLoader version in file", this));
|
||||||
|
this.license = config.<String>getConfigElement("license")
|
||||||
|
.orElseThrow(()->new InvalidModFileException("Missing License, please supply a license.", this));
|
||||||
this.showAsResourcePack = config.<Boolean>getConfigElement("showAsResourcePack").orElse(false);
|
this.showAsResourcePack = config.<Boolean>getConfigElement("showAsResourcePack").orElse(false);
|
||||||
this.properties = config.<UnmodifiableConfig>getConfigElement("properties").
|
this.properties = config.<UnmodifiableConfig>getConfigElement("properties").
|
||||||
map(UnmodifiableConfig::valueMap).orElse(Collections.emptyMap());
|
map(UnmodifiableConfig::valueMap).orElse(Collections.emptyMap());
|
||||||
|
@ -125,4 +128,9 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
|
||||||
public List<? extends IConfigurable> getConfigList(final String... key) {
|
public List<? extends IConfigurable> getConfigList(final String... key) {
|
||||||
return this.config.getConfigList(key);
|
return this.config.getConfigList(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLicense() {
|
||||||
|
return license;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
modLoader="minecraft"
|
modLoader="minecraft"
|
||||||
loaderVersion="1"
|
loaderVersion="1"
|
||||||
|
license="Mojang all rights reserved"
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId="minecraft"
|
modId="minecraft"
|
||||||
version="${global.mcVersion}"
|
version="${global.mcVersion}"
|
||||||
|
|
|
@ -22,12 +22,13 @@ package net.minecraftforge.client.event;
|
||||||
import net.minecraft.client.renderer.color.BlockColors;
|
import net.minecraft.client.renderer.color.BlockColors;
|
||||||
import net.minecraft.client.renderer.color.ItemColors;
|
import net.minecraft.client.renderer.color.ItemColors;
|
||||||
import net.minecraftforge.eventbus.api.Event;
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.IModBusEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use these events to register block/item
|
* Use these events to register block/item
|
||||||
* color handlers at the appropriate time.
|
* color handlers at the appropriate time.
|
||||||
*/
|
*/
|
||||||
public abstract class ColorHandlerEvent extends Event
|
public abstract class ColorHandlerEvent extends Event implements IModBusEvent
|
||||||
{
|
{
|
||||||
public static class Block extends ColorHandlerEvent
|
public static class Block extends ColorHandlerEvent
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,13 +27,14 @@ import net.minecraft.client.renderer.model.ModelResourceLocation;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.client.model.ModelLoader;
|
import net.minecraftforge.client.model.ModelLoader;
|
||||||
import net.minecraftforge.eventbus.api.Event;
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.IModBusEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when the ModelManager is notified of the resource manager reloading.
|
* Fired when the ModelManager is notified of the resource manager reloading.
|
||||||
* Called after model registry is setup, but before it's passed to BlockModelShapes.
|
* Called after model registry is setup, but before it's passed to BlockModelShapes.
|
||||||
*/
|
*/
|
||||||
// TODO: try to merge with ICustomModelLoader
|
// TODO: try to merge with ICustomModelLoader
|
||||||
public class ModelBakeEvent extends Event
|
public class ModelBakeEvent extends Event implements IModBusEvent
|
||||||
{
|
{
|
||||||
private final ModelManager modelManager;
|
private final ModelManager modelManager;
|
||||||
private final Map<ResourceLocation, IBakedModel> modelRegistry;
|
private final Map<ResourceLocation, IBakedModel> modelRegistry;
|
||||||
|
|
|
@ -20,10 +20,11 @@
|
||||||
package net.minecraftforge.client.event;
|
package net.minecraftforge.client.event;
|
||||||
|
|
||||||
import net.minecraftforge.eventbus.api.Event;
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.IModBusEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when you should call {@link net.minecraft.client.particle.ParticleManager#registerFactory}.
|
* Fired when you should call {@link net.minecraft.client.particle.ParticleManager#registerFactory}.
|
||||||
* Note that your {@code ParticleType}s should still be registered during the usual registry events, this
|
* Note that your {@code ParticleType}s should still be registered during the usual registry events, this
|
||||||
* is only for the factories.
|
* is only for the factories.
|
||||||
*/
|
*/
|
||||||
public class ParticleFactoryRegisterEvent extends Event {}
|
public class ParticleFactoryRegisterEvent extends Event implements IModBusEvent {}
|
||||||
|
|
|
@ -22,11 +22,12 @@ package net.minecraftforge.client.event;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.eventbus.api.Event;
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.IModBusEvent;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
public class TextureStitchEvent extends Event
|
public class TextureStitchEvent extends Event implements IModBusEvent
|
||||||
{
|
{
|
||||||
private final AtlasTexture map;
|
private final AtlasTexture map;
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,13 @@
|
||||||
package net.minecraftforge.client.event.sound;
|
package net.minecraftforge.client.event.sound;
|
||||||
|
|
||||||
import net.minecraft.client.audio.SoundEngine;
|
import net.minecraft.client.audio.SoundEngine;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.IModBusEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raised by the SoundManager.loadSoundSettings, this would be a good place for
|
* Raised by the SoundManager.loadSoundSettings, this would be a good place for
|
||||||
* adding your custom sounds to the SoundPool.
|
* adding your custom sounds to the SoundPool.
|
||||||
*/
|
*/
|
||||||
public class SoundLoadEvent extends SoundEvent
|
public class SoundLoadEvent extends SoundEvent implements IModBusEvent
|
||||||
{
|
{
|
||||||
public SoundLoadEvent(SoundEngine manager)
|
public SoundLoadEvent(SoundEngine manager)
|
||||||
{
|
{
|
||||||
|
|
|
@ -457,7 +457,7 @@ public class ModListScreen extends Screen
|
||||||
|
|
||||||
if (vercheck.status == VersionChecker.Status.OUTDATED || vercheck.status == VersionChecker.Status.BETA_OUTDATED)
|
if (vercheck.status == VersionChecker.Status.OUTDATED || vercheck.status == VersionChecker.Status.BETA_OUTDATED)
|
||||||
lines.add(ForgeI18n.parseMessage("fml.menu.mods.info.updateavailable", vercheck.url == null ? "" : vercheck.url));
|
lines.add(ForgeI18n.parseMessage("fml.menu.mods.info.updateavailable", vercheck.url == null ? "" : vercheck.url));
|
||||||
|
lines.add(ForgeI18n.parseMessage("fml.menu.mods.info.license", selectedMod.getOwningFile().getLicense()));
|
||||||
lines.add(null);
|
lines.add(null);
|
||||||
lines.add(selectedMod.getDescription());
|
lines.add(selectedMod.getDescription());
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ modLoader="javafml"
|
||||||
loaderVersion="[24,]"
|
loaderVersion="[24,]"
|
||||||
issueTrackerURL="http://www.minecraftforge.net/"
|
issueTrackerURL="http://www.minecraftforge.net/"
|
||||||
logoFile="forge_logo.png"
|
logoFile="forge_logo.png"
|
||||||
|
license="LGPL v2.1"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId="forge"
|
modId="forge"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
"fml.menu.mods.info.credits":"Credits: {0}",
|
"fml.menu.mods.info.credits":"Credits: {0}",
|
||||||
"fml.menu.mods.info.authors":"Authors: {0}",
|
"fml.menu.mods.info.authors":"Authors: {0}",
|
||||||
"fml.menu.mods.info.displayurl":"Homepage: {0}",
|
"fml.menu.mods.info.displayurl":"Homepage: {0}",
|
||||||
|
"fml.menu.mods.info.license":"License: {0}",
|
||||||
"fml.menu.mods.info.nochildmods":"No child mods found",
|
"fml.menu.mods.info.nochildmods":"No child mods found",
|
||||||
"fml.menu.mods.info.childmods":"Child mods: {0}",
|
"fml.menu.mods.info.childmods":"Child mods: {0}",
|
||||||
"fml.menu.mods.info.updateavailable":"Update available: {0}",
|
"fml.menu.mods.info.updateavailable":"Update available: {0}",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
modLoader="javafml"
|
modLoader="javafml"
|
||||||
loaderVersion="[28,)"
|
loaderVersion="[28,)"
|
||||||
|
license="LGPL v2.1"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId="containertypetest"
|
modId="containertypetest"
|
||||||
|
|
Loading…
Reference in New Issue