use of net.minecraftforge.fml.common.ModMetadata in project MinecraftForge by MinecraftForge.
the class SubstitutionInjectionTest method setup.
@BeforeClass
public static void setup() {
Loader.instance();
Bootstrap.register();
Loader.instance().setupTestHarness(new DummyModContainer(new ModMetadata() {
{
modId = "test";
}
}));
}
use of net.minecraftforge.fml.common.ModMetadata in project SpongeForge by SpongePowered.
the class SpongeModMetadata method get.
public static ModMetadata get(String modId, String name) {
load();
ModMetadata meta = metadata.getMetadataForId(modId, ImmutableMap.of("name", name, "version", ""));
if (!meta.autogenerated) {
if (meta.name == null) {
meta.name = name;
}
if (meta.version == null) {
meta.version = "";
}
}
return meta;
}
use of net.minecraftforge.fml.common.ModMetadata in project DynamicSurroundings by OreCruncher.
the class Presets method postInit.
@EventHandler
public void postInit(@Nonnull final FMLPostInitializationEvent event) {
proxy.postInit(event);
config.save();
// Patch up metadata
if (!proxy.isRunningAsServer()) {
final ModMetadata data = ForgeUtils.getModMetadata(Presets.MOD_ID);
if (data != null) {
data.name = Localization.format("presets.metadata.Name");
data.credits = Localization.format("presets.metadata.Credits");
data.description = Localization.format("presets.metadata.Description");
data.authorList = Arrays.asList(StringUtils.split(Localization.format("presets.metadata.Authors"), ','));
}
}
}
use of net.minecraftforge.fml.common.ModMetadata in project DynamicSurroundings by OreCruncher.
the class DSurround method postInit.
@EventHandler
public void postInit(@Nonnull final FMLPostInitializationEvent event) {
proxy.postInit(event);
config.save();
// Patch up metadata
if (!proxy.isRunningAsServer()) {
final ModMetadata data = ForgeUtils.getModMetadata(DSurround.MOD_ID);
if (data != null) {
data.name = Localization.format("dsurround.metadata.Name");
data.credits = Localization.format("dsurround.metadata.Credits");
data.description = Localization.format("dsurround.metadata.Description");
data.authorList = Arrays.asList(StringUtils.split(Localization.format("dsurround.metadata.Authors"), ','));
}
}
}
Aggregations