commit
c45c99d07c
3 changed files with 52 additions and 0 deletions
|
@ -19,4 +19,20 @@ archivesBaseName = "modid"
|
|||
|
||||
minecraft {
|
||||
version = "${version}"
|
||||
}
|
||||
|
||||
processResources
|
||||
{
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod/info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.example.examplemod;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
|
||||
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
|
||||
public class ExampleMod
|
||||
{
|
||||
public static final String MODID = "examplemod";
|
||||
public static final String VERSION = "1.0";
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
// some example code
|
||||
System.out.println("DIRT BLOCK >> "+Block.dirt.getUnlocalizedName());
|
||||
}
|
||||
}
|
16
fml/install/src/main/resources/mcmod.info
Normal file
16
fml/install/src/main/resources/mcmod.info
Normal file
|
@ -0,0 +1,16 @@
|
|||
[
|
||||
{
|
||||
"modid": "examplemod",
|
||||
"name": "Example Mod",
|
||||
"description": "Example placeholder mod.",
|
||||
"version": "${version}",
|
||||
"mcversion": "${mcversion}",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
"authors": ["ExampleDude"],
|
||||
"credits": "The Forge and FML guys, for making this example",
|
||||
"logoFile": "",
|
||||
"screenshots": [],
|
||||
"dependencies": []
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue