Merge pull request #307 from AbrarSyed/master

updated samples
This commit is contained in:
LexManos 2013-11-17 17:58:01 -08:00
commit c45c99d07c
3 changed files with 52 additions and 0 deletions

View file

@ -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'
}
}

View file

@ -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());
}
}

View 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": []
}
]