Created
February 12, 2014 15:11
-
-
Save anonymous/8957216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package amw.witchcraft; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.creativetab.CreativeTabs; | |
import net.minecraft.item.Item; | |
import net.minecraft.item.ItemStack; | |
import net.minecraftforge.common.MinecraftForge; | |
import cpw.mods.fml.common.Mod; | |
import cpw.mods.fml.common.Mod.EventHandler; | |
import cpw.mods.fml.common.Mod.Instance; | |
import cpw.mods.fml.common.SidedProxy; | |
import cpw.mods.fml.common.event.FMLInitializationEvent; | |
import cpw.mods.fml.common.event.FMLPostInitializationEvent; | |
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | |
import cpw.mods.fml.common.network.NetworkMod; | |
import cpw.mods.fml.common.registry.GameRegistry; | |
import cpw.mods.fml.common.registry.LanguageRegistry; | |
@Mod(modid=witchcraftInfo.ID, name=witchcraftInfo.NAME, version=witchcraftInfo.VERS) | |
@NetworkMod(clientSideRequired=true, serverSideRequired=false) | |
public class witchcraft { | |
public static CreativeTabs amwWitchcraft = new CreativeTabs("amwWitchcraft") { | |
public ItemStack getIconItemStack() { | |
return new ItemStack(amw.witchcraft.witchcraft.flowerSoul.blockID, 1, 0); | |
} | |
}; | |
//other | |
public static Item bookOfShadows = new bookOfShadows(710).setCreativeTab(amwWitchcraft).setUnlocalizedName("bookOfShadows"); | |
public final static Item soulFragment = new soulFragment(706).setCreativeTab(amwWitchcraft); | |
//bushes | |
public final static Block bushShadow = new bushShadow(700, Material.leaves).setCreativeTab(amwWitchcraft); | |
public final static Block bushSoul = new bushSoul(704, Material.rock).setCreativeTab(amwWitchcraft); | |
//flowers | |
public static Block flowerShadow = new flowerShadow(701).setUnlocalizedName("flowerShadow").setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setCreativeTab(amwWitchcraft).setTextureName(witchcraftInfo.ID.toLowerCase() + ":flower_shadow"); | |
public static Block flowerSoul = new flowerSoul(705).setUnlocalizedName("flowerSoul").setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setCreativeTab(amwWitchcraft).setLightValue(1.0F).setTextureName(witchcraftInfo.ID.toLowerCase() + ":flower_soul"); | |
//wands | |
private final static Item wandGravity = new wandGravity(702).setCreativeTab(amwWitchcraft); | |
private final static Item wandPush = new wandPush(703).setCreativeTab(amwWitchcraft); | |
// The instance of your mod that Forge uses. | |
@Instance("witchcraft") | |
public static witchcraft instance; | |
// Says where the client and server 'proxy' code is loaded. | |
@SidedProxy(clientSide=witchcraftInfo.CLIENTPROXY + "ClientProxy", serverSide=witchcraftInfo.COMMONPROXY + "CommonProxy") | |
public static CommonProxy proxy; | |
@EventHandler | |
public void preInit(FMLPreInitializationEvent event) { | |
// Stub Method | |
} | |
@EventHandler | |
public void load(FMLInitializationEvent event) { | |
proxy.registerRenderers(); | |
LanguageRegistry.instance().addStringLocalization("itemGroup.amwWitchcraft", "en_US", "Azania Witchcraft"); | |
//bushes | |
GameRegistry.registerBlock(bushShadow, "bushShadow"); | |
LanguageRegistry.addName(bushShadow, "Shadow Bush"); | |
GameRegistry.registerWorldGenerator(new generationShadowBush()); | |
GameRegistry.registerBlock(bushSoul, "bushSoul"); | |
LanguageRegistry.addName(bushSoul, "Soul Bush"); | |
MinecraftForge.setBlockHarvestLevel(bushSoul, "pickaxe", 3); | |
GameRegistry.registerWorldGenerator(new generationSoulBush()); | |
//flowers | |
GameRegistry.registerBlock(flowerShadow, "flowerShadow"); | |
LanguageRegistry.addName(flowerShadow, "Shadow Flower"); | |
GameRegistry.registerBlock(flowerSoul, "flowerSoul"); | |
LanguageRegistry.addName(flowerSoul, "Soul Flower"); | |
GameRegistry.addRecipe(new ItemStack(witchcraft.flowerSoul), new Object [] { | |
" x ", " y ", " z ", 'x', witchcraft.soulFragment, 'y', Block.vine, 'z', Item.stick}); | |
//wands | |
GameRegistry.registerItem(wandGravity, "wandGravity"); | |
LanguageRegistry.addName(wandGravity, "Wand Of Gravity"); | |
GameRegistry.registerItem(wandPush, "wandPush"); | |
LanguageRegistry.addName(wandPush, "Wand Of Push"); | |
GameRegistry.addRecipe(new ItemStack(witchcraft.wandPush), new Object [] { | |
" x ", " y ", " y ", 'x', witchcraft.flowerShadow, 'y', Item.stick }); | |
//other | |
GameRegistry.registerItem(bookOfShadows, "bookOfShadows"); | |
GameRegistry.registerItem(soulFragment, "soulFragment"); | |
LanguageRegistry.addName(soulFragment, "Soul Fragment"); | |
GameRegistry.addSmelting(witchcraft.bushSoul.blockID, new ItemStack(witchcraft.soulFragment), 0.1f); | |
for (int i = 0; i < names.length; i++) | |
LanguageRegistry.addName(new ItemStack(bookOfShadows, 1, i), bookOfShadows.names[i]); | |
GameRegistry.addRecipe(new ItemStack(bookOfShadows, 1, bookOfShadows.srcsOfPower), new Object[] { | |
"aba", "aca", "ded", 'a', Item.paper, 'b', witchcraft.flowerShadow, 'c', witchcraft.soulFragment, 'd', Item.leather, 'e', Item.blazeRod }); | |
} | |
@EventHandler | |
public void postInit(FMLPostInitializationEvent event) { | |
// Stub Method | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment