Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Seroemod;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.item.EnumToolMaterial;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraftforge.common.EnumHelper;
- import net.minecraftforge.common.MinecraftForge;
- import Seroemod.Blocks.SapphireBlock;
- import Seroemod.Bow.SapphireArrow;
- import Seroemod.Items.SapphireGem;
- import Seroemod.Items.SapphireShard;
- import Seroemod.Lightsabers.BlueLightsaber;
- import Seroemod.Lightsabers.BlueLightsaberHilt;
- import Seroemod.Lightsabers.LightsaberHilt;
- import Seroemod.Ore.SapphireOre;
- import Seroemod.Ore.SapphireWorldGeneration;
- import Seroemod.Tools.ToolSapphireAxe;
- import Seroemod.Tools.ToolSapphireHoe;
- import Seroemod.Tools.ToolSapphirePickaxe;
- import Seroemod.Tools.ToolSapphireShovel;
- import Seroemod.Tools.ToolSapphireSword;
- import cpw.mods.fml.common.Mod;
- import cpw.mods.fml.common.Mod.EventHandler;
- import cpw.mods.fml.common.event.FMLLoadEvent;
- import cpw.mods.fml.common.event.FMLPostInitializationEvent;
- import cpw.mods.fml.common.event.FMLPreInitializationEvent;
- import cpw.mods.fml.common.event.FMLServerStartingEvent;
- import cpw.mods.fml.common.network.NetworkMod;
- import cpw.mods.fml.common.registry.GameRegistry;
- import cpw.mods.fml.common.registry.LanguageRegistry;
- @Mod(modid = "seroemod", name = "Seroe's Mod", version = "0.1")
- @NetworkMod(clientSideRequired = true, serverSideRequired = false)
- public class SeroeMod
- {
- // === Blocks === //
- // Block Section
- public static Block sapphireBlock, sapphireOre, amethystOre;
- // Block IDs
- int sapphireBlockID = 3000;
- int sapphireOreBlockID = 3001;
- int amethystOreBlockID = 3002;
- // === Items === ///
- // Item Section
- // Sapphire
- public static Item sapphireGem, sapphireShard, amethystGem, sapphireSword, sapphireShovel, sapphireAxe, sapphirePickaxe, sapphireHoe;
- // Lightsaber
- public static Item hiltLightsaber, blueLightsaber, hiltBlueLightsaber;
- // Arrow
- public static Item sapphireArrow;
- // Materials
- public static EnumToolMaterial Sapphire = EnumHelper.addToolMaterial("Sapphire", 2, 1033, 7.0F, 2.5F, 20);
- public static EnumToolMaterial Kyber = EnumHelper.addToolMaterial("Kyber", 1, 100, 0.0F, 3.5F, 1);
- // Item IDs
- static int sapphireGemID = 4000 - 256;
- static int sapphireShardID = 4001 - 256;
- static int amethystGemID = 4002 - 256;
- static int sapphireSwordID = 4003 - 256;
- static int sapphireShovelID = 4004 - 256;
- static int sapphireAxeID = 4005 - 256;
- static int sapphirePickaxeID = 4006 - 256;
- static int sapphireHoeID = 4007 - 256;
- static int hiltLightsaberID = 4008 - 256;
- static int blueLightsaberID = 4009 - 256;
- static int hiltBlueLightsaberID = 4010 - 256;
- static int sapphireArrowID = 4011 - 256;
- // Instance of our mod
- public static SeroeMod instance;
- @EventHandler
- public void preInit(FMLPreInitializationEvent event)
- // Contains Block inits, Item inits, Tool inits, World Gen
- {
- // ==== Blocks ==== //
- // Sapphire Block Stuff
- this.sapphireBlock = new SapphireBlock(sapphireBlockID, Material.rock);
- LanguageRegistry.addName(sapphireBlock, "Sapphire Block");
- MinecraftForge.setBlockHarvestLevel(sapphireBlock, "pickaxe", 2);
- GameRegistry.registerBlock(sapphireBlock, "sapphireBlock");
- // Sapphire Ore Stuff
- this.sapphireOre = new SapphireOre(sapphireOreBlockID);
- LanguageRegistry.addName(sapphireOre, "Sapphire Ore");
- MinecraftForge.setBlockHarvestLevel(sapphireOre, "pickaxe", 2);
- GameRegistry.registerBlock(sapphireOre, "sapphireOre");
- // === Items === //
- // Sapphire Gem Stuff
- this.sapphireGem = new SapphireGem(sapphireGemID);
- LanguageRegistry.addName(sapphireGem, "Sapphire Gem");
- // Sapphire Shard Stuff
- this.sapphireShard = new SapphireShard(sapphireShardID);
- LanguageRegistry.addName(sapphireShard, "Sapphire Shard");
- // Sapphire Sword
- sapphireSword = new ToolSapphireSword(sapphireSwordID, Sapphire);
- GameRegistry.registerItem(sapphireSword, "sapphireSword");
- LanguageRegistry.addName(sapphireSword, "Sapphire Sword");
- // Sapphire Axe
- sapphireAxe = new ToolSapphireAxe(sapphireAxeID, Sapphire);
- GameRegistry.registerItem(sapphireAxe, "sapphireAxe");
- LanguageRegistry.addName(sapphireAxe, "Sapphire Axe");
- // Sapphire Hoe
- sapphireHoe = new ToolSapphireHoe(sapphireHoeID, Sapphire);
- GameRegistry.registerItem(sapphireHoe, "sapphireHoe");
- LanguageRegistry.addName(sapphireHoe, "Sapphire Hoe");
- // Sapphire Shovel
- sapphireShovel = new ToolSapphireShovel(sapphireShovelID, Sapphire);
- GameRegistry.registerItem(sapphireShovel, "sapphireShovel");
- LanguageRegistry.addName(sapphireShovel, "Sapphire Shovel");
- // Sapphire Pickaxe
- sapphirePickaxe = new ToolSapphirePickaxe(sapphirePickaxeID, Sapphire);
- GameRegistry.registerItem(sapphirePickaxe, "sapphirePickaxe");
- LanguageRegistry.addName(sapphirePickaxe, "Sapphire Pickaxe");
- // Lightsaber Hilt
- hiltLightsaber = new LightsaberHilt(hiltLightsaberID);
- LanguageRegistry.addName(hiltLightsaber, "Lightsaber Hilt");
- // Blue Lightsaber
- blueLightsaber = new BlueLightsaber(blueLightsaberID, Kyber);
- GameRegistry.registerItem(blueLightsaber, "blueLightsaber");
- LanguageRegistry.addName(blueLightsaber, "Blue Lightsaber");
- // Blue Lightsaber Hilt
- hiltBlueLightsaber = new BlueLightsaberHilt(hiltBlueLightsaberID);
- LanguageRegistry.addName(hiltBlueLightsaber, "Blue Lightsaber Hilt");
- // Arrow
- sapphireArrow = new SapphireArrow(sapphireArrowID);
- LanguageRegistry.addName(sapphireArrow, "Sapphire Arrow");
- // === Sounds === //
- MinecraftForge.EVENT_BUS.register(new SeroeModSound());
- // === World Generation === //
- GameRegistry.registerWorldGenerator(new SapphireWorldGeneration());
- // === RECIPES === //
- // Item Stacks
- ItemStack sapphireStack = new ItemStack(sapphireGem, 9);
- ItemStack sapphireShardStack = new ItemStack(sapphireShard, 9);
- // === Shaped Crafting Recipes === //
- // Sapphire Block
- GameRegistry.addRecipe(new ItemStack(sapphireBlock),
- "xxx", "xxx", "xxx",
- 'x', sapphireGem
- );
- // Sapphire Gem
- GameRegistry.addRecipe(new ItemStack(sapphireGem),
- "xxx", "xxx", "xxx",
- 'x', sapphireShard
- );
- // Sapphire Sword
- GameRegistry.addRecipe(new ItemStack(sapphireSword),
- " x ", " x ", " y ",
- 'x', sapphireGem,
- 'y', Item.stick
- );
- // Sapphire Axe 1
- GameRegistry.addRecipe(new ItemStack(sapphireAxe),
- "xx ", "xy ", " y ",
- 'x', sapphireGem,
- 'y', Item.stick
- );
- // Sapphire Axe 2
- GameRegistry.addRecipe(new ItemStack(sapphireAxe),
- " xx", " yx", " y ",
- 'x', sapphireGem,
- 'y', Item.stick
- );
- // Sapphire Hoe 1
- GameRegistry.addRecipe(new ItemStack(sapphireHoe),
- "xx ", " y ", " y ",
- 'x', sapphireGem,
- 'y', Item.stick
- );
- // Sapphire Hoe 2
- GameRegistry.addRecipe(new ItemStack(sapphireHoe),
- " xx", " y ", " y ",
- 'x', sapphireGem,
- 'y', Item.stick
- );
- // Sapphire Shovel
- GameRegistry.addRecipe(new ItemStack(sapphireShovel),
- " x ", " y ", " y ",
- 'y', Item.stick,
- 'x', sapphireGem
- );
- // Sapphire Pickaxe
- GameRegistry.addRecipe(new ItemStack(sapphirePickaxe),
- "xxx", " y ", " y ",
- 'x', sapphireGem,
- 'y', Item.stick
- );
- // Lightsaber Hilt
- GameRegistry.addRecipe(new ItemStack(hiltLightsaber),
- " x ", " y ", " z ",
- 'x', Item.diamond,
- 'y', Item.redstone,
- 'z', Item.ingotIron
- );
- /* // Blue Lightsaber
- GameRegistry.addRecipe(new ItemStack(blueLightsaber),
- " x ", " x ", " z ",
- 'x', sapphireGem,
- 'z', hiltLightsaber
- );
- */
- // Blue Lightsaber Hilt
- GameRegistry.addRecipe(new ItemStack(hiltBlueLightsaber),
- " x ", " x ", " z ",
- 'x', sapphireGem,
- 'z', hiltLightsaber
- );
- // === Shapeless Crafting Recipes === //
- // Sapphires
- GameRegistry.addShapelessRecipe(sapphireStack, sapphireBlock);
- // Sapphire Shards
- GameRegistry.addShapelessRecipe(sapphireShardStack, sapphireGem);
- }
- @EventHandler
- public void load(FMLLoadEvent event)
- // Contains itemstacks and recipes
- {
- }
- @EventHandler
- public void postInit(FMLPostInitializationEvent event)
- {
- }
- @EventHandler
- public void serverStart(FMLServerStartingEvent event)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment