| package goldenmod; |
| |
| import goldenmod.Items.Ruby; |
| import goldenmod.Items.Sapphire; |
| import goldenmod.Items.Amethyst; |
| import goldenmod.Items.MythrilIngot; |
| import net.minecraft.block.Block; |
| import net.minecraft.item.Item; |
| 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.FMLPreInitializationEvent; |
| import cpw.mods.fml.common.network.NetworkMod; |
| import cpw.mods.fml.common.registry.GameRegistry; |
| import cpw.mods.fml.common.registry.LanguageRegistry; |
| import cpw.mods.fml.common.registry.TickRegistry; |
| import cpw.mods.fml.relauncher.Side; |
| |
| @Mod(modid="GF", name="GoldenPack", version="1.0") |
| @NetworkMod(clientSideRequired=true, serverSideRequired=false) |
| |
| public class GoldenMain { |
| |
| @SidedProxy(clientSide = "goldenmod.ClientProxy", serverSide = "goldenmod.CommonProxy") |
| public static goldenmod.CommonProxy proxy; |
| |
| @Instance("GF") |
| public static GoldenMain instance; |
| |
| public static Block RubyOre, SapphireOre, AmethystOre, RubyBlock, SapphireBlock, AmethystBlock, MythrilOre, MythrilBlock, ObsidianForced, ObsiStairs, DoubleSlabObsi, SingleSlabObsi ; |
| |
| public static Item Ruby, Sapphire, Amethyst, MythrilIngot; |
| @EventHandler |
| public void PreInit(FMLPreInitializationEvent event){ |
| |
| |
| GameRegistry.registerWorldGenerator(new WorldGeneratorTutoriel()); |
| if(event.getSide().isClient()) |
| TickRegistry.registerTickHandler(new CustomMenuTickHandler(), Side.CLIENT); |
| |
| |
| RubyOre = new goldenmod.Blocks.RubyOre(3000).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Ruby Ore").setTextureName("forge:rubyOre"); |
| SapphireOre = new goldenmod.Blocks.SapphireOre(3001).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Sapphire Ore").setTextureName("forge:sapphireOre"); |
| AmethystOre = new goldenmod.Blocks.AmethystOre(3002).setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Amethyst Ore").setTextureName("forge:amethystOre"); |
| MythrilOre = new goldenmod.Blocks.MythrilOre(3003).setHardness(2.0F).setResistance(3.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Mythril Ore").setTextureName("forge:mythril_ore"); |
| RubyBlock = new goldenmod.Blocks.BlockOreStorage(3004).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Ruby Block").setTextureName("forge:rubyBlock"); |
| SapphireBlock = new goldenmod.Blocks.BlockOreStorage(3005).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Sapphire Block").setTextureName("forge:sapphireBlock"); |
| AmethystBlock = new goldenmod.Blocks.BlockOreStorage(3006).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Amethyst Block").setTextureName("forge:amethystBlock"); |
| MythrilBlock = new goldenmod.Blocks.BlockOreStorage(3007).setHardness(3.0F).setResistance(4.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("Mythril Block").setTextureName("forge:mythril_block"); |
| ObsidianForced = new goldenmod.Blocks.BlockObsidianRenfo(3008).setHardness(300.0F).setResistance(2000.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("Reinforced Obsidian").setTextureName("forge:obsidianForced"); |
| |
| |
| Item Ruby = new Ruby(5000).setUnlocalizedName("Ruby").setTextureName("forge:ruby"); |
| Item Sapphire = new Sapphire(5001).setUnlocalizedName("Sapphire").setTextureName("forge:sapphire"); |
| Item Amethyst = new Amethyst(5002).setUnlocalizedName("Amethyst").setTextureName("forge:amethyst"); |
| Item MythrilIngot = new MythrilIngot(5003).setUnlocalizedName("Mythril Ingot").setTextureName("forge:mythril_ingot"); |
| |
| |
| GameRegistry.registerBlock(RubyOre, "RubyOre"); |
| LanguageRegistry.addName(RubyOre, "Ruby Ore"); |
| GameRegistry.registerBlock(SapphireOre, "SapphireOre"); |
| LanguageRegistry.addName(SapphireOre, "Sapphire Ore"); |
| GameRegistry.registerBlock(AmethystOre, "AmethystOre"); |
| LanguageRegistry.addName(AmethystOre, "Amethyst Ore"); |
| GameRegistry.registerBlock(MythrilOre, "MythrilOre"); |
| LanguageRegistry.addName(MythrilOre, "Mythril Ore"); |
| GameRegistry.registerBlock(RubyBlock, "RubyBlock"); |
| LanguageRegistry.addName(RubyBlock, "Ruby Block"); |
| GameRegistry.registerBlock(SapphireBlock, "SapphireBlock"); |
| LanguageRegistry.addName(SapphireBlock, "Sapphire Block"); |
| GameRegistry.registerBlock(AmethystBlock, "AmethystBlock"); |
| LanguageRegistry.addName(AmethystBlock, "Amethyst Block"); |
| GameRegistry.registerBlock(MythrilBlock, "MythrilBlock"); |
| LanguageRegistry.addName(MythrilBlock, "Mythril Block"); |
| GameRegistry.registerBlock(ObsidianForced, "ObsidianForced"); |
| LanguageRegistry.addName(ObsidianForced, "Reinforced Obsidian"); |
| |
| |
| GameRegistry.registerItem(Ruby, "Ruby"); |
| LanguageRegistry.addName(Ruby, "Ruby"); |
| GameRegistry.registerItem(Sapphire, "Sapphire"); |
| LanguageRegistry.addName(Sapphire, "Sapphire"); |
| GameRegistry.registerItem(Amethyst, "Amethyst"); |
| LanguageRegistry.addName(Amethyst, "Amethyst"); |
| GameRegistry.registerItem(MythrilIngot, "MythrilIngot"); |
| LanguageRegistry.addName(MythrilIngot, "Mythril Ingot"); |
| |
| } |
| |
| @EventHandler |
| public void PreInit(FMLInitializationEvent Event){ |
| |
| |
| proxy.registerRenderers(); |
| |
| |
| |
| |
| |
| } |
| |
| @EventHandler |
| public void PostInit(FMLInitializationEvent event){ |
| MinecraftForge.setBlockHarvestLevel(RubyOre, "pickaxe", 2); |
| MinecraftForge.setBlockHarvestLevel(SapphireOre, "pickaxe", 2); |
| MinecraftForge.setBlockHarvestLevel(AmethystOre, "pickaxe", 2); |
| MinecraftForge.setBlockHarvestLevel(MythrilOre, "pickaxe", 1); |
| MinecraftForge.setBlockHarvestLevel(RubyBlock, "pickaxe", 2); |
| MinecraftForge.setBlockHarvestLevel(SapphireBlock, "pickaxe", 2); |
| MinecraftForge.setBlockHarvestLevel(AmethystBlock, "pickaxe", 2); |
| MinecraftForge.setBlockHarvestLevel(MythrilBlock, "pickaxe", 1); |
| MinecraftForge.setBlockHarvestLevel(ObsidianForced, "pickaxe", 3); |
| |
| } |
| } |