2012-11-05 20:29:04 +01:00
package mekanism.common ;
2012-08-19 04:29:38 +02:00
2012-10-02 20:39:40 +02:00
import ic2.api.Ic2Recipes ;
2012-08-15 22:41:41 +02:00
import java.util.logging.Logger ;
2013-01-02 15:19:46 +01:00
import mekanism.api.InfusionInput ;
import mekanism.api.InfusionOutput ;
2012-12-20 22:53:39 +01:00
import mekanism.api.InfusionType ;
2012-11-05 20:29:04 +01:00
import mekanism.api.ItemMachineUpgrade ;
2012-12-19 21:23:55 +01:00
import mekanism.api.Tier.EnergyCubeTier ;
2012-11-05 20:29:04 +01:00
import mekanism.client.SoundHandler ;
2012-12-20 22:53:39 +01:00
import net.minecraft.block.Block ;
import net.minecraft.item.Item ;
import net.minecraft.item.ItemStack ;
import net.minecraft.item.crafting.CraftingManager ;
import net.minecraft.item.crafting.FurnaceRecipes ;
import net.minecraftforge.common.Configuration ;
import net.minecraftforge.common.MinecraftForge ;
2012-11-03 03:27:30 +01:00
import net.minecraftforge.oredict.OreDictionary ;
2012-11-07 02:44:59 +01:00
import net.minecraftforge.oredict.ShapedOreRecipe ;
2012-12-20 22:53:39 +01:00
import universalelectricity.prefab.multiblock.BlockMulti ;
import universalelectricity.prefab.multiblock.TileEntityMulti ;
import cpw.mods.fml.common.Mod ;
2012-08-15 22:41:41 +02:00
import cpw.mods.fml.common.Mod.Init ;
2012-08-17 03:46:21 +02:00
import cpw.mods.fml.common.Mod.Instance ;
2012-08-26 15:48:42 +02:00
import cpw.mods.fml.common.Mod.PostInit ;
2012-08-15 22:41:41 +02:00
import cpw.mods.fml.common.Mod.PreInit ;
2012-12-30 22:34:45 +01:00
import cpw.mods.fml.common.Mod.ServerStopping ;
2012-12-20 22:53:39 +01:00
import cpw.mods.fml.common.SidedProxy ;
2012-08-15 22:41:41 +02:00
import cpw.mods.fml.common.event.FMLInitializationEvent ;
2012-08-26 15:48:42 +02:00
import cpw.mods.fml.common.event.FMLPostInitializationEvent ;
2012-08-15 22:41:41 +02:00
import cpw.mods.fml.common.event.FMLPreInitializationEvent ;
2012-12-30 22:34:45 +01:00
import cpw.mods.fml.common.event.FMLServerStoppingEvent ;
2012-08-15 22:41:41 +02:00
import cpw.mods.fml.common.network.NetworkMod ;
import cpw.mods.fml.common.network.NetworkRegistry ;
import cpw.mods.fml.common.registry.EntityRegistry ;
import cpw.mods.fml.common.registry.GameRegistry ;
import cpw.mods.fml.common.registry.LanguageRegistry ;
2012-12-20 22:53:39 +01:00
import cpw.mods.fml.relauncher.Side ;
import cpw.mods.fml.relauncher.SideOnly ;
2012-08-15 22:41:41 +02:00
/ * *
2012-11-05 20:29:04 +01:00
* Mekanism mod - - adds in Tools , Armor , Weapons , Machines , and Magic . Universal source .
2012-08-15 22:41:41 +02:00
* @author AidanBrady
*
* /
2013-01-05 05:58:53 +01:00
@Mod ( modid = " Mekanism " , name = " Mekanism " , version = " 5.0.7 " )
2012-11-05 20:29:04 +01:00
@NetworkMod ( channels = { " Mekanism " } , clientSideRequired = true , serverSideRequired = false , packetHandler = PacketHandler . class )
public class Mekanism
2012-08-15 22:41:41 +02:00
{
2012-11-05 20:29:04 +01:00
/** Mekanism logger instance */
2012-08-15 22:41:41 +02:00
public static Logger logger = Logger . getLogger ( " Minecraft " ) ;
2012-11-05 20:29:04 +01:00
/** Mekanism proxy instance */
@SidedProxy ( clientSide = " mekanism.client.ClientProxy " , serverSide = " mekanism.common.CommonProxy " )
2012-08-15 22:41:41 +02:00
public static CommonProxy proxy ;
2012-11-05 20:29:04 +01:00
/** Mekanism mod instance */
@Instance ( " Mekanism " )
public static Mekanism instance ;
2012-08-15 22:41:41 +02:00
2012-11-05 20:29:04 +01:00
/** Mekanism hooks instance */
public static MekanismHooks hooks ;
2012-08-15 22:41:41 +02:00
2012-11-05 20:29:04 +01:00
/** Mekanism configuration instance */
2012-09-08 18:48:24 +02:00
public static Configuration configuration ;
2012-08-31 01:27:35 +02:00
2012-11-05 20:29:04 +01:00
/** Mekanism version number */
2013-01-05 05:58:53 +01:00
public static Version versionNumber = new Version ( 5 , 0 , 7 ) ;
2012-09-20 15:59:30 +02:00
2012-11-05 20:29:04 +01:00
/** Mekanism creative tab */
public static CreativeTabMekanism tabMekanism = new CreativeTabMekanism ( ) ;
2012-10-30 02:13:40 +01:00
2012-11-05 20:29:04 +01:00
/** The latest version number which is received from the Mekanism server */
2012-08-15 22:41:41 +02:00
public static String latestVersionNumber ;
2012-09-20 15:59:30 +02:00
2012-11-05 20:29:04 +01:00
/** The recent news which is received from the Mekanism server */
2012-08-15 22:41:41 +02:00
public static String recentNews ;
2012-09-20 15:59:30 +02:00
2012-10-15 17:51:13 +02:00
/** The main MachineryManager instance that is used by all machines */
public static MachineryManager manager ;
2012-10-22 03:29:26 +02:00
2012-11-05 16:52:56 +01:00
@SideOnly ( Side . CLIENT )
2012-10-22 03:29:26 +02:00
/** The main SoundHandler instance that is used by all audio sources */
public static SoundHandler audioHandler ;
2012-10-15 17:51:13 +02:00
2012-11-05 20:29:04 +01:00
/** The IP used to connect to the Mekanism server */
2012-08-15 22:41:41 +02:00
public static String hostIP = " 71.56.58.57 " ;
2012-09-20 15:59:30 +02:00
2012-11-05 20:29:04 +01:00
/** The port used to connect to the Mekanism server */
2012-08-15 22:41:41 +02:00
public static int hostPort = 3073 ;
2012-08-15 23:27:24 +02:00
2012-08-15 22:41:41 +02:00
//Block IDs
2012-11-21 16:14:35 +01:00
public static int basicBlockID = 3000 ;
2012-09-25 21:15:47 +02:00
public static int machineBlockID = 3001 ;
public static int oreBlockID = 3002 ;
public static int obsidianTNTID = 3003 ;
2012-11-28 16:33:34 +01:00
public static int energyCubeID = 3004 ;
2012-12-30 22:34:45 +01:00
public static int nullRenderID = 3005 ;
public static int gasTankID = 3006 ;
2012-08-15 22:41:41 +02:00
2012-11-28 16:33:34 +01:00
2012-08-15 22:41:41 +02:00
//Extra Items
2012-11-25 16:45:00 +01:00
public static ItemElectricBow ElectricBow ;
2012-08-15 22:41:41 +02:00
public static Item Stopwatch ;
public static Item WeatherOrb ;
2012-08-17 03:46:21 +02:00
public static Item EnrichedAlloy ;
2012-10-02 20:39:40 +02:00
public static ItemEnergized EnergyTablet ;
2012-10-22 03:29:26 +02:00
public static Item SpeedUpgrade ;
public static Item EnergyUpgrade ;
public static Item UltimateUpgrade ;
2012-11-27 01:18:50 +01:00
public static ItemAtomicDisassembler AtomicDisassembler ;
public static Item AtomicCore ;
2012-11-28 16:33:34 +01:00
public static ItemStorageTank StorageTank ;
2012-12-09 06:24:27 +01:00
public static Item ControlCircuit ;
2012-12-09 19:03:49 +01:00
public static Item EnrichedIron ;
2012-12-20 22:53:39 +01:00
public static Item CompressedCarbon ;
2012-08-15 22:41:41 +02:00
//Extra Blocks
2012-11-21 16:14:35 +01:00
public static Block BasicBlock ;
2012-09-25 21:15:47 +02:00
public static Block MachineBlock ;
public static Block OreBlock ;
2012-08-15 22:41:41 +02:00
public static Block ObsidianTNT ;
2012-11-28 16:33:34 +01:00
public static Block EnergyCube ;
2012-11-21 16:14:35 +01:00
public static BlockMulti NullRender ;
public static Block GasTank ;
2012-11-02 02:30:40 +01:00
//MultiID Items
public static Item Dust ;
public static Item Ingot ;
2012-08-15 22:41:41 +02:00
//Boolean Values
2012-08-20 18:29:31 +02:00
public static boolean extrasEnabled = true ;
2012-08-20 18:32:11 +02:00
public static boolean oreGenerationEnabled = true ;
2012-08-15 22:41:41 +02:00
//Extra data
public static float ObsidianTNTBlastRadius = 12 . 0F ;
public static int ObsidianTNTDelay = 100 ;
2012-09-08 18:48:24 +02:00
/** Total ticks passed since thePlayer joined theWorld */
2012-08-15 22:41:41 +02:00
public static int ticksPassed = 0 ;
2012-10-09 22:27:10 +02:00
public static int ANIMATED_TEXTURE_INDEX = 240 ;
2012-12-09 19:03:49 +01:00
public static double TO_IC2 = 1 ;
public static double TO_BC = . 1 ;
public static double FROM_IC2 = 1 ;
public static double FROM_BC = 10 ;
2012-12-03 16:10:48 +01:00
2012-08-15 22:41:41 +02:00
/ * *
* Adds all in - game crafting and smelting recipes .
* /
public void addRecipes ( )
{
//Crafting Recipes
2012-11-25 16:45:00 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( BasicBlock , 1 , 3 ) , new Object [ ] {
" *** " , " *** " , " *** " , Character . valueOf ( '*' ) , Item . coal
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( Item . coal , 9 ) , new Object [ ] {
2012-11-21 16:14:35 +01:00
" * " , Character . valueOf ( '*' ) , new ItemStack ( BasicBlock , 1 , 3 )
2012-11-07 02:44:59 +01:00
} ) ) ;
2012-11-21 16:14:35 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( BasicBlock , 1 , 2 ) , new Object [ ] {
2012-11-25 16:45:00 +01:00
" *** " , " *** " , " *** " , Character . valueOf ( '*' ) , " ingotObsidian "
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( Ingot , 9 , 0 ) , new Object [ ] {
2012-11-21 16:14:35 +01:00
" * " , Character . valueOf ( '*' ) , new ItemStack ( BasicBlock , 1 , 2 )
2012-11-07 02:44:59 +01:00
} ) ) ;
2012-11-21 16:14:35 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( BasicBlock , 1 , 4 ) , new Object [ ] {
2012-11-25 16:45:00 +01:00
" *** " , " *** " , " *** " , Character . valueOf ( '*' ) , " ingotGlowstone "
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( Ingot , 9 , 3 ) , new Object [ ] {
2012-11-21 16:14:35 +01:00
" * " , Character . valueOf ( '*' ) , new ItemStack ( BasicBlock , 1 , 4 )
2012-11-07 02:44:59 +01:00
} ) ) ;
2012-11-21 16:14:35 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( BasicBlock , 1 , 0 ) , new Object [ ] {
2012-11-25 16:45:00 +01:00
" XXX " , " XXX " , " XXX " , Character . valueOf ( 'X' ) , " ingotPlatinum "
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( Ingot , 9 , 1 ) , new Object [ ] {
2012-11-21 16:14:35 +01:00
" * " , Character . valueOf ( '*' ) , new ItemStack ( BasicBlock , 1 , 0 )
2012-11-07 02:44:59 +01:00
} ) ) ;
2012-11-21 16:14:35 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( BasicBlock , 1 , 1 ) , new Object [ ] {
2012-12-30 22:34:45 +01:00
" *** " , " *** " , " *** " , Character . valueOf ( '*' ) , " ingotBronze "
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( Ingot , 9 , 2 ) , new Object [ ] {
2012-11-21 16:14:35 +01:00
" * " , Character . valueOf ( '*' ) , new ItemStack ( BasicBlock , 1 , 1 )
2012-11-07 02:44:59 +01:00
} ) ) ;
2012-12-20 22:53:39 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( BasicBlock , 1 , 5 ) , new Object [ ] {
2012-12-30 22:34:45 +01:00
" *** " , " *** " , " *** " , Character . valueOf ( '*' ) , " ingotSteel "
2012-12-20 22:53:39 +01:00
} ) ) ;
2012-08-15 22:41:41 +02:00
//Extra
2012-11-07 02:44:59 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( ObsidianTNT , 1 ) , new Object [ ] {
2012-08-15 22:41:41 +02:00
" *** " , " XXX " , " *** " , Character . valueOf ( '*' ) , Block . obsidian , Character . valueOf ( 'X' ) , Block . tnt
2012-11-07 02:44:59 +01:00
} ) ) ;
2012-11-25 16:45:00 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( ElectricBow . getUnchargedItem ( ) , new Object [ ] {
2012-11-28 17:26:52 +01:00
" AB " , " E B " , " AB " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'B' ) , Item . silk , Character . valueOf ( 'E' ) , EnergyTablet . getUnchargedItem ( )
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( EnergyTablet . getUnchargedItem ( ) , new Object [ ] {
2012-11-28 17:26:52 +01:00
" RCR " , " ECE " , " RCR " , Character . valueOf ( 'C' ) , Item . ingotGold , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'E' ) , EnrichedAlloy
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 0 ) , new Object [ ] {
2012-12-09 06:24:27 +01:00
" ARA " , " CIC " , " ARA " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 5 ) , Character . valueOf ( 'C' ) , ControlCircuit
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 1 ) , new Object [ ] {
2012-12-09 06:24:27 +01:00
" RCR " , " GIG " , " RCR " , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'C' ) , ControlCircuit , Character . valueOf ( 'G' ) , Block . glass , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 5 )
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 2 ) , new Object [ ] {
2012-12-09 06:24:27 +01:00
" SCS " , " RIR " , " SCS " , Character . valueOf ( 'S' ) , Block . cobblestone , Character . valueOf ( 'C' ) , ControlCircuit , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 5 )
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 3 ) , new Object [ ] {
2012-12-09 06:24:27 +01:00
" RLR " , " CIC " , " RLR " , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'L' ) , Item . bucketLava , Character . valueOf ( 'C' ) , ControlCircuit , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 5 )
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( SpeedUpgrade ) , new Object [ ] {
2012-11-23 03:22:11 +01:00
" PAP " , " AEA " , " PAP " , Character . valueOf ( 'P' ) , " dustPlatinum " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'E' ) , Item . emerald
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( EnergyUpgrade ) , new Object [ ] {
2012-11-28 17:26:52 +01:00
" RAR " , " AEA " , " RAR " , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'E' ) , EnergyTablet . getUnchargedItem ( )
2012-11-07 02:44:59 +01:00
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( UltimateUpgrade ) , new Object [ ] {
2012-10-25 23:55:32 +02:00
" ERA " , " RDR " , " ARS " , Character . valueOf ( 'E' ) , EnergyUpgrade , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'D' ) , Item . diamond , Character . valueOf ( 'S' ) , SpeedUpgrade
2012-11-07 02:44:59 +01:00
} ) ) ;
2012-11-27 01:18:50 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( AtomicCore ) , new Object [ ] {
2012-12-23 20:46:11 +01:00
" AOA " , " PDP " , " AOA " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'O' ) , " dustObsidian " , Character . valueOf ( 'P' ) , " dustPlatinum " , Character . valueOf ( 'D' ) , Item . diamond
2012-11-09 03:22:18 +01:00
} ) ) ;
2012-11-27 01:18:50 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( AtomicDisassembler . getUnchargedItem ( ) , new Object [ ] {
" AEA " , " ACA " , " O " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'E' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'C' ) , AtomicCore , Character . valueOf ( 'O' ) , " ingotObsidian "
2012-11-09 03:22:18 +01:00
} ) ) ;
2012-11-15 21:04:12 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( EnrichedAlloy ) , new Object [ ] {
2012-11-09 03:22:18 +01:00
" R " , " RIR " , " R " , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'I' ) , Item . ingotIron
} ) ) ;
2012-11-28 16:33:34 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( StorageTank . getEmptyItem ( ) , new Object [ ] {
2012-11-15 21:04:12 +01:00
" III " , " IDI " , " III " , Character . valueOf ( 'I' ) , Item . ingotIron , Character . valueOf ( 'D' ) , " dustIron "
} ) ) ;
2012-11-21 16:14:35 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( GasTank , new Object [ ] {
2012-12-14 17:58:06 +01:00
" PPP " , " PDP " , " PPP " , Character . valueOf ( 'P' ) , " ingotPlatinum " , Character . valueOf ( 'D' ) , " dustIron "
2012-11-21 16:14:35 +01:00
} ) ) ;
2012-12-19 21:23:55 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( MekanismUtils . getEnergyCubeWithTier ( EnergyCubeTier . BASIC ) , new Object [ ] {
2012-11-28 17:26:52 +01:00
" ELE " , " TIT " , " ELE " , Character . valueOf ( 'E' ) , EnrichedAlloy , Character . valueOf ( 'L' ) , new ItemStack ( Item . dyePowder , 1 , 4 ) , Character . valueOf ( 'T' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 5 )
} ) ) ;
2012-12-19 21:23:55 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( MekanismUtils . getEnergyCubeWithTier ( EnergyCubeTier . ADVANCED ) , new Object [ ] {
" EGE " , " TBT " , " EGE " , Character . valueOf ( 'E' ) , EnrichedAlloy , Character . valueOf ( 'G' ) , Item . ingotGold , Character . valueOf ( 'T' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'B' ) , MekanismUtils . getEnergyCubeWithTier ( EnergyCubeTier . BASIC )
2012-11-28 17:26:52 +01:00
} ) ) ;
2012-12-19 21:23:55 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( MekanismUtils . getEnergyCubeWithTier ( EnergyCubeTier . ULTIMATE ) , new Object [ ] {
" EDE " , " TAT " , " EDE " , Character . valueOf ( 'E' ) , EnrichedAlloy , Character . valueOf ( 'D' ) , Item . diamond , Character . valueOf ( 'T' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'A' ) , MekanismUtils . getEnergyCubeWithTier ( EnergyCubeTier . ADVANCED )
2012-11-28 17:26:52 +01:00
} ) ) ;
2012-12-09 06:24:27 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( ControlCircuit ) , new Object [ ] {
2012-12-23 20:46:11 +01:00
" P " , " PEP " , " P " , Character . valueOf ( 'P' ) , " ingotPlatinum " , Character . valueOf ( 'E' ) , EnrichedAlloy
2012-12-09 06:24:27 +01:00
} ) ) ;
2012-12-30 22:34:45 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( EnrichedIron , 6 ) , new Object [ ] {
2012-12-27 20:37:24 +01:00
" A " , " I " , " A " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'I' ) , Item . ingotIron
2012-12-09 19:03:49 +01:00
} ) ) ;
2012-12-30 22:34:45 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( EnrichedIron , 4 ) , new Object [ ] {
2012-12-27 20:37:24 +01:00
" C " , " I " , " C " , Character . valueOf ( 'C' ) , " dustCopper " , Character . valueOf ( 'I' ) , Item . ingotIron
2012-12-09 19:03:49 +01:00
} ) ) ;
2012-12-30 22:34:45 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( EnrichedIron , 4 ) , new Object [ ] {
2012-12-27 20:37:24 +01:00
" T " , " I " , " T " , Character . valueOf ( 'T' ) , " dustTin " , Character . valueOf ( 'I' ) , Item . ingotIron
2012-12-09 19:03:49 +01:00
} ) ) ;
2012-12-19 21:23:55 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 5 ) , new Object [ ] {
" CAC " , " GIG " , " CAC " , Character . valueOf ( 'C' ) , ControlCircuit , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'G' ) , " dustGold " , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 5 )
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 6 ) , new Object [ ] {
" CAC " , " DFD " , " CAC " , Character . valueOf ( 'C' ) , ControlCircuit , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'D' ) , " dustDiamond " , Character . valueOf ( 'F' ) , new ItemStack ( MachineBlock , 1 , 5 )
} ) ) ;
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 7 ) , new Object [ ] {
" CAC " , " cFc " , " CAC " , Character . valueOf ( 'C' ) , ControlCircuit , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'c' ) , AtomicCore , Character . valueOf ( 'F' ) , new ItemStack ( MachineBlock , 1 , 6 )
} ) ) ;
2012-12-21 14:30:40 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 8 ) , new Object [ ] {
" IFI " , " CEC " , " IFI " , Character . valueOf ( 'I' ) , Item . ingotIron , Character . valueOf ( 'F' ) , Block . stoneOvenIdle , Character . valueOf ( 'C' ) , ControlCircuit , Character . valueOf ( 'E' ) , EnrichedAlloy
} ) ) ;
2012-09-25 21:15:47 +02:00
if ( extrasEnabled )
{
2012-11-07 02:44:59 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapedOreRecipe ( new ItemStack ( MachineBlock , 1 , 4 ) , new Object [ ] {
2012-10-02 20:39:40 +02:00
" SGS " , " GDG " , " SGS " , Character . valueOf ( 'S' ) , EnrichedAlloy , Character . valueOf ( 'G' ) , Block . glass , Character . valueOf ( 'D' ) , Block . blockDiamond
2012-11-07 02:44:59 +01:00
} ) ) ;
2012-09-25 21:15:47 +02:00
}
2012-08-15 22:41:41 +02:00
2012-09-25 21:15:47 +02:00
//Furnace Recipes
2012-11-29 02:03:55 +01:00
FurnaceRecipes . smelting ( ) . addSmelting ( oreBlockID , 0 , new ItemStack ( Ingot , 1 , 1 ) , 1 . 0F ) ;
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . shiftedIndex , 2 , new ItemStack ( Ingot , 1 , 1 ) , 1 . 0F ) ;
2012-12-03 16:10:48 +01:00
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . shiftedIndex , 0 , new ItemStack ( Item . ingotIron ) , 1 . 0F ) ;
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . shiftedIndex , 1 , new ItemStack ( Item . ingotGold ) , 1 . 0F ) ;
2012-12-20 22:53:39 +01:00
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . shiftedIndex , 5 , new ItemStack ( Ingot , 1 , 4 ) , 1 . 0F ) ;
2012-12-23 20:46:11 +01:00
GameRegistry . addSmelting ( Item . coal . shiftedIndex , new ItemStack ( CompressedCarbon ) , 1 . 0F ) ;
2012-09-25 21:15:47 +02:00
//Enrichment Chamber Recipes
2012-11-15 21:04:12 +01:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Dust , 1 , 4 ) , new ItemStack ( Item . diamond ) ) ;
2012-10-02 20:39:40 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreRedstone ) , new ItemStack ( Item . redstone , 2 ) ) ;
2012-11-09 03:22:18 +01:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . obsidian ) , new ItemStack ( Dust , 1 , 3 ) ) ;
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreIron ) , new ItemStack ( Dust , 2 , 0 ) ) ;
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreGold ) , new ItemStack ( Dust , 2 , 1 ) ) ;
2012-12-23 20:46:11 +01:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Item . coal , 4 ) , new ItemStack ( CompressedCarbon , 8 ) ) ;
2012-09-25 21:15:47 +02:00
//Platinum Compressor Recipes
2012-11-02 02:30:40 +01:00
RecipeHandler . addPlatinumCompressorRecipe ( new ItemStack ( Item . lightStoneDust ) , new ItemStack ( Ingot , 1 , 3 ) ) ;
2012-09-25 21:15:47 +02:00
//Combiner Recipes
2012-10-02 20:39:40 +02:00
RecipeHandler . addCombinerRecipe ( new ItemStack ( Item . redstone , 4 ) , new ItemStack ( Block . oreRedstone ) ) ;
2012-11-02 02:30:40 +01:00
RecipeHandler . addCombinerRecipe ( new ItemStack ( Item . redstone ) , new ItemStack ( Ingot , 1 , 2 ) ) ;
2012-10-02 20:39:40 +02:00
RecipeHandler . addCombinerRecipe ( new ItemStack ( Item . diamond ) , new ItemStack ( Block . oreDiamond ) ) ;
RecipeHandler . addCombinerRecipe ( new ItemStack ( Item . dyePowder , 4 , 4 ) , new ItemStack ( Block . oreLapis ) ) ;
2012-09-25 21:15:47 +02:00
//Crusher Recipes
2012-11-15 21:04:12 +01:00
RecipeHandler . addCrusherRecipe ( new ItemStack ( Item . diamond ) , new ItemStack ( Dust , 1 , 4 ) ) ;
2012-11-09 03:22:18 +01:00
RecipeHandler . addCrusherRecipe ( new ItemStack ( Item . ingotIron ) , new ItemStack ( Dust , 1 , 0 ) ) ;
RecipeHandler . addCrusherRecipe ( new ItemStack ( Item . ingotGold ) , new ItemStack ( Dust , 1 , 1 ) ) ;
2012-10-02 20:39:40 +02:00
//Theoretical Elementizer Recipes
RecipeHandler . addTheoreticalElementizerRecipe ( new ItemStack ( EnrichedAlloy ) , new ItemStack ( TileEntityTheoreticalElementizer . getRandomMagicItem ( ) ) ) ;
2012-12-20 22:53:39 +01:00
//Metallurgic Infuser Recipes
2013-01-02 15:19:46 +01:00
RecipeHandler . addMetallurgicInfuserRecipe ( InfusionInput . getInfusion ( InfusionType . COAL , 10 , new ItemStack ( EnrichedIron ) ) , new ItemStack ( Dust , 1 , 5 ) ) ;
2012-08-15 22:41:41 +02:00
}
2012-08-26 15:48:42 +02:00
2012-08-15 22:41:41 +02:00
/ * *
* Adds all item and block names .
* /
public void addNames ( )
{
//Extras
2012-12-09 19:03:49 +01:00
LanguageRegistry . addName ( ElectricBow , " Electric Bow " ) ;
2012-08-15 23:27:24 +02:00
LanguageRegistry . addName ( ObsidianTNT , " Obsidian TNT " ) ;
2012-09-25 21:15:47 +02:00
2012-08-20 18:29:31 +02:00
if ( extrasEnabled = = true )
2012-08-15 22:41:41 +02:00
{
2012-08-15 23:27:24 +02:00
LanguageRegistry . addName ( Stopwatch , " Steve's Stopwatch " ) ;
LanguageRegistry . addName ( WeatherOrb , " Weather Orb " ) ;
2012-08-17 03:46:21 +02:00
LanguageRegistry . addName ( EnrichedAlloy , " Enriched Alloy " ) ;
2012-08-15 22:41:41 +02:00
}
2012-09-08 18:48:24 +02:00
2012-10-02 20:39:40 +02:00
LanguageRegistry . addName ( EnergyTablet , " Energy Tablet " ) ;
2012-10-22 03:29:26 +02:00
LanguageRegistry . addName ( SpeedUpgrade , " Speed Upgrade " ) ;
LanguageRegistry . addName ( EnergyUpgrade , " Energy Upgrade " ) ;
LanguageRegistry . addName ( UltimateUpgrade , " Ultimate Upgrade " ) ;
2012-11-29 16:41:37 +01:00
LanguageRegistry . addName ( AtomicDisassembler , " Atomic Disassembler " ) ;
LanguageRegistry . addName ( AtomicCore , " Atomic Core " ) ;
2012-11-25 16:45:00 +01:00
LanguageRegistry . addName ( ElectricBow , " Electric Bow " ) ;
2012-11-28 16:33:34 +01:00
LanguageRegistry . addName ( StorageTank , " Hydrogen Tank " ) ;
2012-11-21 16:14:35 +01:00
LanguageRegistry . addName ( NullRender , " Null Render " ) ;
LanguageRegistry . addName ( GasTank , " Gas Tank " ) ;
2012-11-28 16:33:34 +01:00
LanguageRegistry . addName ( StorageTank , " Storage Tank " ) ;
2012-12-09 06:24:27 +01:00
LanguageRegistry . addName ( ControlCircuit , " Control Circuit " ) ;
2012-12-09 19:03:49 +01:00
LanguageRegistry . addName ( EnrichedIron , " Enriched Iron " ) ;
2012-12-20 22:53:39 +01:00
LanguageRegistry . addName ( CompressedCarbon , " Compressed Carbon " ) ;
2012-10-02 20:39:40 +02:00
2012-09-08 18:48:24 +02:00
//Localization for MultiBlock
2012-11-21 16:14:35 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.PlatinumBlock.name " , " Platinum Block " ) ;
2012-12-30 22:34:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.BronzeBlock.name " , " Bronze Block " ) ;
2012-11-21 16:14:35 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.RefinedObsidian.name " , " Refined Obsidian " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.CoalBlock.name " , " Coal Block " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.RefinedGlowstone.name " , " Refined Glowstone " ) ;
2012-12-20 22:53:39 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.SteelBlock.name " , " Steel Block " ) ;
2012-11-21 16:14:35 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.ControlPanel.name " , " Control Panel " ) ;
2012-09-25 21:15:47 +02:00
//Localization for MachineBlock
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.EnrichmentChamber.name " , " Enrichment Chamber " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.PlatinumCompressor.name " , " Platinum Compressor " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.Combiner.name " , " Combiner " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.Crusher.name " , " Crusher " ) ;
2012-11-02 02:30:40 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.TheoreticalElementizer.name " , " Theoretical Elementizer " ) ;
2012-12-19 21:23:55 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.BasicSmeltingFactory.name " , " Basic Smelting Factory " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.AdvancedSmeltingFactory.name " , " Advanced Smelting Factory " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.UltimateSmeltingFactory.name " , " Ultimate Smelting Factory " ) ;
2012-12-20 22:53:39 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.MetallurgicInfuser.name " , " Metallurgic Infuser " ) ;
2012-09-25 21:15:47 +02:00
//Localization for OreBlock
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.OreBlock.PlatinumOre.name " , " Platinum Ore " ) ;
2012-11-28 16:33:34 +01:00
//Localization for EnergyCube
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.EnergyCube.Basic.name " , " Basic Energy Cube " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.EnergyCube.Advanced.name " , " Advanced Energy Cube " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.EnergyCube.Ultimate.name " , " Ultimate Energy Cube " ) ;
2012-10-02 20:39:40 +02:00
2012-11-02 02:30:40 +01:00
//Localization for Dust
LanguageRegistry . instance ( ) . addStringLocalization ( " item.ironDust.name " , " Iron Dust " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.goldDust.name " , " Gold Dust " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.platinumDust.name " , " Platinum Dust " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.obsidianDust.name " , " Obsidian Dust " ) ;
2012-11-15 21:04:12 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.diamondDust.name " , " Diamond Dust " ) ;
2012-12-30 22:34:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.steelDust.name " , " Steel Dust " ) ;
2012-11-02 02:30:40 +01:00
//Localization for Ingot
LanguageRegistry . instance ( ) . addStringLocalization ( " item.obsidianIngot.name " , " Obsidian Ingot " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.platinumIngot.name " , " Platinum Ingot " ) ;
2012-12-30 22:34:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.bronzeIngot.name " , " Bronze Ingot " ) ;
2012-11-02 02:30:40 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.glowstoneIngot.name " , " Glowstone Ingot " ) ;
2012-12-30 22:34:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.steelIngot.name " , " Steel Ingot " ) ;
2012-12-03 16:10:48 +01:00
//Localization for Mekanism creative tab
LanguageRegistry . instance ( ) . addStringLocalization ( " itemGroup.tabMekanism " , " Mekanism " ) ;
2012-08-15 22:41:41 +02:00
}
2012-08-26 15:48:42 +02:00
2012-08-15 22:41:41 +02:00
/ * *
* Adds all item textures from the sprite sheet .
* /
public void addTextures ( )
{
2012-08-20 18:29:31 +02:00
if ( extrasEnabled = = true )
2012-08-15 22:41:41 +02:00
{
Stopwatch . setIconIndex ( 224 ) ;
WeatherOrb . setIconIndex ( 226 ) ;
2012-08-17 03:46:21 +02:00
EnrichedAlloy . setIconIndex ( 227 ) ;
2012-08-15 22:41:41 +02:00
}
2012-10-02 20:39:40 +02:00
EnergyTablet . setIconIndex ( 228 ) ;
2012-10-22 03:29:26 +02:00
SpeedUpgrade . setIconIndex ( 232 ) ;
EnergyUpgrade . setIconIndex ( 231 ) ;
UltimateUpgrade . setIconIndex ( 233 ) ;
2012-11-27 01:18:50 +01:00
AtomicDisassembler . setIconIndex ( 253 ) ;
AtomicCore . setIconIndex ( 254 ) ;
2012-11-25 16:45:00 +01:00
ElectricBow . setIconIndex ( 252 ) ;
2012-11-28 16:33:34 +01:00
StorageTank . setIconIndex ( 255 ) ;
2012-12-09 06:24:27 +01:00
ControlCircuit . setIconIndex ( 223 ) ;
2012-12-09 19:03:49 +01:00
EnrichedIron . setIconIndex ( 222 ) ;
2012-12-20 22:53:39 +01:00
CompressedCarbon . setIconIndex ( 221 ) ;
2012-08-15 22:41:41 +02:00
}
2012-08-26 15:48:42 +02:00
2012-08-15 22:41:41 +02:00
/ * *
* Adds and registers all items .
* /
public void addItems ( )
{
2012-12-09 06:24:27 +01:00
ElectricBow = ( ItemElectricBow ) new ItemElectricBow ( 11200 ) . setItemName ( " ElectricBow " ) ;
2012-08-20 18:29:31 +02:00
if ( extrasEnabled = = true )
2012-08-15 22:41:41 +02:00
{
2012-12-09 06:24:27 +01:00
Stopwatch = new ItemStopwatch ( 11202 ) . setItemName ( " Stopwatch " ) ;
WeatherOrb = new ItemWeatherOrb ( 11203 ) . setItemName ( " WeatherOrb " ) ;
2012-08-15 22:41:41 +02:00
}
2012-12-09 06:24:27 +01:00
Dust = new ItemDust ( 11204 - 256 ) ;
Ingot = new ItemIngot ( 11205 - 256 ) ;
EnergyTablet = ( ItemEnergized ) new ItemEnergized ( 11206 , 250000 , 800 , 2500 ) . setItemName ( " EnergyTablet " ) ;
SpeedUpgrade = new ItemMachineUpgrade ( 11207 , 0 , 150 ) . setItemName ( " SpeedUpgrade " ) ;
EnergyUpgrade = new ItemMachineUpgrade ( 11208 , 1000 , 0 ) . setItemName ( " EnergyUpgrade " ) ;
UltimateUpgrade = new ItemMachineUpgrade ( 11209 , 2500 , 180 ) . setItemName ( " UltimateUpgrade " ) ;
AtomicDisassembler = ( ItemAtomicDisassembler ) new ItemAtomicDisassembler ( 11210 ) . setItemName ( " AtomicDisassembler " ) ;
AtomicCore = new ItemMekanism ( 11211 ) . setItemName ( " AtomicCore " ) ;
EnrichedAlloy = new ItemMekanism ( 11212 ) . setItemName ( " EnrichedAlloy " ) ;
StorageTank = ( ItemStorageTank ) new ItemStorageTank ( 11213 , 1600 , 16 , 16 ) . setItemName ( " StorageTank " ) ;
ControlCircuit = new ItemMekanism ( 11214 ) . setItemName ( " ControlCircuit " ) ;
2012-12-09 19:03:49 +01:00
EnrichedIron = new ItemMekanism ( 11215 ) . setItemName ( " EnrichedIron " ) ;
2012-12-20 22:53:39 +01:00
CompressedCarbon = new ItemMekanism ( 11216 ) . setItemName ( " CompressedCarbon " ) ;
2012-08-15 22:41:41 +02:00
}
2012-08-26 15:48:42 +02:00
2012-08-15 22:41:41 +02:00
/ * *
* Adds and registers all blocks .
* /
public void addBlocks ( )
{
//Declarations
2012-11-21 16:14:35 +01:00
BasicBlock = new BlockBasic ( basicBlockID ) . setBlockName ( " BasicBlock " ) ;
2012-09-25 21:15:47 +02:00
MachineBlock = new BlockMachine ( machineBlockID ) . setBlockName ( " MachineBlock " ) ;
OreBlock = new BlockOre ( oreBlockID ) . setBlockName ( " OreBlock " ) ;
2012-11-28 16:33:34 +01:00
EnergyCube = new BlockEnergyCube ( energyCubeID ) . setBlockName ( " EnergyCube " ) ;
2012-11-05 20:29:04 +01:00
ObsidianTNT = new BlockObsidianTNT ( obsidianTNTID ) . setBlockName ( " ObsidianTNT " ) . setCreativeTab ( tabMekanism ) ;
2012-11-21 16:14:35 +01:00
NullRender = ( BlockMulti ) new BlockMulti ( nullRenderID ) . setBlockName ( " NullRender " ) ;
GasTank = new BlockGasTank ( gasTankID ) . setBlockName ( " GasTank " ) ;
2012-08-15 22:41:41 +02:00
//Registrations
2012-12-30 22:34:45 +01:00
GameRegistry . registerBlock ( ObsidianTNT , " ObsidianTNT " ) ;
GameRegistry . registerBlock ( NullRender , " NullRender " ) ;
GameRegistry . registerBlock ( GasTank , " GasTank " ) ;
2012-09-08 18:48:24 +02:00
2012-11-15 21:04:12 +01:00
//Add block items into itemsList for blocks with common IDs.
2012-11-21 16:14:35 +01:00
Item . itemsList [ basicBlockID ] = new ItemBlockBasic ( basicBlockID - 256 , BasicBlock ) . setItemName ( " BasicBlock " ) ;
2012-10-02 20:39:40 +02:00
Item . itemsList [ machineBlockID ] = new ItemBlockMachine ( machineBlockID - 256 , MachineBlock ) . setItemName ( " MachineBlock " ) ;
Item . itemsList [ oreBlockID ] = new ItemBlockOre ( oreBlockID - 256 , OreBlock ) . setItemName ( " OreBlock " ) ;
2012-11-28 16:33:34 +01:00
Item . itemsList [ energyCubeID ] = new ItemBlockEnergyCube ( energyCubeID - 256 , EnergyCube ) . setItemName ( " EnergyCube " ) ;
2012-08-15 22:41:41 +02:00
}
2012-08-26 15:48:42 +02:00
/ * *
2012-11-15 21:04:12 +01:00
* Integrates the mod with other mods - - registering items and blocks with the Forge Ore Dictionary
* and adding machine recipes with other items ' corresponding resources .
2012-08-26 15:48:42 +02:00
* /
public void addIntegratedItems ( )
{
2012-11-07 02:44:59 +01:00
OreDictionary . registerOre ( " dustIron " , new ItemStack ( Dust , 1 , 0 ) ) ;
OreDictionary . registerOre ( " dustGold " , new ItemStack ( Dust , 1 , 1 ) ) ;
OreDictionary . registerOre ( " dustPlatinum " , new ItemStack ( Dust , 1 , 2 ) ) ;
OreDictionary . registerOre ( " dustObsidian " , new ItemStack ( Dust , 1 , 3 ) ) ;
2012-12-19 21:23:55 +01:00
OreDictionary . registerOre ( " dustDiamond " , new ItemStack ( Dust , 1 , 4 ) ) ;
2012-12-30 22:34:45 +01:00
OreDictionary . registerOre ( " dustSteel " , new ItemStack ( Dust , 1 , 5 ) ) ;
2012-11-07 02:44:59 +01:00
OreDictionary . registerOre ( " ingotObsidian " , new ItemStack ( Ingot , 1 , 0 ) ) ;
OreDictionary . registerOre ( " ingotPlatinum " , new ItemStack ( Ingot , 1 , 1 ) ) ;
2012-12-30 22:34:45 +01:00
OreDictionary . registerOre ( " ingotBronze " , new ItemStack ( Ingot , 1 , 2 ) ) ;
2012-11-07 02:44:59 +01:00
OreDictionary . registerOre ( " ingotGlowstone " , new ItemStack ( Ingot , 1 , 3 ) ) ;
2012-12-30 22:34:45 +01:00
OreDictionary . registerOre ( " ingotSteel " , new ItemStack ( Ingot , 1 , 4 ) ) ;
2012-11-03 03:27:30 +01:00
2012-11-15 21:04:12 +01:00
OreDictionary . registerOre ( " orePlatinum " , new ItemStack ( OreBlock , 1 , 0 ) ) ;
2012-11-03 03:27:30 +01:00
if ( hooks . IC2Loaded )
{
2012-11-07 02:44:59 +01:00
if ( ! hooks . RailcraftLoaded )
{
Ic2Recipes . addMaceratorRecipe ( new ItemStack ( Block . obsidian ) , new ItemStack ( Dust , 1 , 3 ) ) ;
}
2012-12-03 16:10:48 +01:00
RecipeHandler . addCrusherRecipe ( new ItemStack ( Item . coal ) , hooks . IC2CoalDust ) ;
for ( ItemStack ore : OreDictionary . getOres ( " oreCopper " ) )
{
RecipeHandler . addEnrichmentChamberRecipe ( ore , MekanismUtils . getStackWithSize ( hooks . IC2CopperDust , 2 ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " oreTin " ) )
{
RecipeHandler . addEnrichmentChamberRecipe ( ore , MekanismUtils . getStackWithSize ( hooks . IC2TinDust , 2 ) ) ;
}
}
for ( ItemStack ore : OreDictionary . getOres ( " orePlatinum " ) )
{
RecipeHandler . addEnrichmentChamberRecipe ( ore , new ItemStack ( Dust , 2 , 2 ) ) ;
}
try {
for ( ItemStack ore : OreDictionary . getOres ( " oreLead " ) )
{
RecipeHandler . addEnrichmentChamberRecipe ( ore , OreDictionary . getOres ( " dustLead " ) . get ( 0 ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " ingotLead " ) )
{
RecipeHandler . addCrusherRecipe ( ore , OreDictionary . getOres ( " dustLead " ) . get ( 0 ) ) ;
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " oreSilver " ) )
{
RecipeHandler . addEnrichmentChamberRecipe ( ore , OreDictionary . getOres ( " dustSilver " ) . get ( 0 ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " ingotSilver " ) )
{
RecipeHandler . addCrusherRecipe ( ore , OreDictionary . getOres ( " dustSilver " ) . get ( 0 ) ) ;
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " ingotObsidian " ) )
{
RecipeHandler . addCrusherRecipe ( ore , new ItemStack ( Dust , 1 , 3 ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " ingotPlatinum " ) )
{
RecipeHandler . addCrusherRecipe ( ore , new ItemStack ( Dust , 1 , 2 ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " ingotRedstone " ) )
{
RecipeHandler . addCrusherRecipe ( ore , new ItemStack ( Item . redstone ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " ingotGlowstone " ) )
{
RecipeHandler . addCrusherRecipe ( ore , new ItemStack ( Item . lightStoneDust ) ) ;
}
2012-12-20 22:53:39 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " ingotSteel " ) )
{
RecipeHandler . addEnrichmentChamberRecipe ( ore , new ItemStack ( Ingot , 1 , 4 ) ) ;
}
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " ingotCopper " ) )
{
RecipeHandler . addCrusherRecipe ( ore , OreDictionary . getOres ( " dustCopper " ) . get ( 0 ) ) ;
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " ingotTin " ) )
{
RecipeHandler . addCrusherRecipe ( ore , OreDictionary . getOres ( " dustTin " ) . get ( 0 ) ) ;
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustIron " ) )
{
RecipeHandler . addCombinerRecipe ( MekanismUtils . getStackWithSize ( ore , 2 ) , new ItemStack ( Block . oreIron ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " dustGold " ) )
{
RecipeHandler . addCombinerRecipe ( MekanismUtils . getStackWithSize ( ore , 2 ) , new ItemStack ( Block . oreGold ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " dustObsidian " ) )
{
RecipeHandler . addCombinerRecipe ( ore , new ItemStack ( Block . obsidian ) ) ;
RecipeHandler . addPlatinumCompressorRecipe ( ore , new ItemStack ( Ingot , 1 , 0 ) ) ;
2012-11-03 03:27:30 +01:00
}
2012-12-03 16:10:48 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustPlatinum " ) )
2012-11-03 03:27:30 +01:00
{
2012-12-03 16:10:48 +01:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . getStackWithSize ( ore , 2 ) , new ItemStack ( OreBlock , 1 , 0 ) ) ;
2012-11-03 03:27:30 +01:00
}
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " dustCopper " ) )
{
RecipeHandler . addCombinerRecipe ( MekanismUtils . getStackWithSize ( ore , 2 ) , OreDictionary . getOres ( " oreCopper " ) . get ( 0 ) ) ;
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-20 22:53:39 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " ingotCopper " ) )
{
2013-01-02 15:19:46 +01:00
RecipeHandler . addMetallurgicInfuserRecipe ( InfusionInput . getInfusion ( InfusionType . TIN , 10 , ore ) , new ItemStack ( Ingot , 1 , 2 ) ) ;
2012-12-20 22:53:39 +01:00
}
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " dustTin " ) )
{
RecipeHandler . addCombinerRecipe ( MekanismUtils . getStackWithSize ( ore , 2 ) , OreDictionary . getOres ( " oreTin " ) . get ( 0 ) ) ;
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " dustLead " ) )
{
RecipeHandler . addCombinerRecipe ( MekanismUtils . getStackWithSize ( ore , 2 ) , OreDictionary . getOres ( " oreLead " ) . get ( 0 ) ) ;
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " dustSilver " ) )
{
RecipeHandler . addCombinerRecipe ( MekanismUtils . getStackWithSize ( ore , 2 ) , OreDictionary . getOres ( " oreSilver " ) . get ( 0 ) ) ;
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-08-26 15:48:42 +02:00
}
2012-08-15 22:41:41 +02:00
/ * *
* Adds and registers all entities and tile entities .
* /
public void addEntities ( )
{
//Entity IDs
EntityRegistry . registerGlobalEntityID ( EntityObsidianTNT . class , " ObsidianTNT " , EntityRegistry . findGlobalUniqueEntityId ( ) ) ;
//Registrations
EntityRegistry . registerModEntity ( EntityObsidianTNT . class , " ObsidianTNT " , 51 , this , 40 , 5 , true ) ;
//Tile entities
GameRegistry . registerTileEntity ( TileEntityEnrichmentChamber . class , " EnrichmentChamber " ) ;
GameRegistry . registerTileEntity ( TileEntityPlatinumCompressor . class , " PlatinumCompressor " ) ;
GameRegistry . registerTileEntity ( TileEntityCombiner . class , " Combiner " ) ;
GameRegistry . registerTileEntity ( TileEntityCrusher . class , " Crusher " ) ;
2012-11-28 16:33:34 +01:00
GameRegistry . registerTileEntity ( TileEntityEnergyCube . class , " EnergyCube " ) ;
2012-11-21 16:14:35 +01:00
GameRegistry . registerTileEntity ( TileEntityMulti . class , " Multi " ) ;
GameRegistry . registerTileEntity ( TileEntityControlPanel . class , " ControlPanel " ) ;
GameRegistry . registerTileEntity ( TileEntityGasTank . class , " GasTank " ) ;
2012-12-19 21:23:55 +01:00
GameRegistry . registerTileEntity ( TileEntitySmeltingFactory . class , " SmeltingFactory " ) ;
GameRegistry . registerTileEntity ( TileEntityAdvancedSmeltingFactory . class , " AdvancedSmeltingFactory " ) ;
GameRegistry . registerTileEntity ( TileEntityUltimateSmeltingFactory . class , " UltimateSmeltingFactory " ) ;
2012-12-20 22:53:39 +01:00
GameRegistry . registerTileEntity ( TileEntityMetallurgicInfuser . class , " MetallurgicInfuser " ) ;
2012-11-21 16:14:35 +01:00
//Load tile entities that have special renderers.
proxy . registerSpecialTileEntities ( ) ;
2012-08-15 22:41:41 +02:00
}
2012-10-03 21:12:17 +02:00
/ * *
* Registers the server command handler .
* /
@SideOnly ( Side . SERVER )
public void registerServerCommands ( )
{
ServerCommandHandler . initialize ( ) ;
}
2012-12-30 22:34:45 +01:00
@ServerStopping
public void serverStopping ( FMLServerStoppingEvent event )
{
proxy . unloadSoundHandler ( ) ;
}
2012-10-18 16:26:34 +02:00
@PreInit
public void preInit ( FMLPreInitializationEvent event )
{
//Set the mod's configuration
configuration = new Configuration ( event . getSuggestedConfigurationFile ( ) ) ;
}
2012-08-26 15:48:42 +02:00
@PostInit
public void postInit ( FMLPostInitializationEvent event )
{
2012-11-05 20:29:04 +01:00
hooks = new MekanismHooks ( ) ;
2012-09-25 05:53:22 +02:00
hooks . hook ( ) ;
2012-08-26 15:48:42 +02:00
addIntegratedItems ( ) ;
2012-10-22 03:29:26 +02:00
2012-11-05 20:29:04 +01:00
System . out . println ( " [Mekanism] Hooking complete. " ) ;
2012-11-05 16:52:56 +01:00
proxy . loadSoundHandler ( ) ;
2012-08-26 15:48:42 +02:00
}
2012-10-18 16:26:34 +02:00
@Init
public void init ( FMLInitializationEvent event )
2012-08-15 22:41:41 +02:00
{
//Register the mod's ore handler
GameRegistry . registerWorldGenerator ( new OreHandler ( ) ) ;
2012-12-09 06:24:27 +01:00
2012-08-15 22:41:41 +02:00
//Register the mod's GUI handler
2012-11-25 16:45:00 +01:00
NetworkRegistry . instance ( ) . registerGuiHandler ( this , new CoreGuiHandler ( ) ) ;
2012-12-09 06:24:27 +01:00
2012-10-15 17:51:13 +02:00
//Register the MachineryManager
manager = new MachineryManager ( ) ;
2012-12-09 06:24:27 +01:00
2012-11-05 20:29:04 +01:00
System . out . println ( " [Mekanism] Version " + versionNumber + " initializing... " ) ;
2012-12-09 06:24:27 +01:00
2012-09-08 18:48:24 +02:00
new ThreadGetData ( ) ;
2012-12-09 06:24:27 +01:00
//Load proxy
2012-08-15 22:41:41 +02:00
proxy . registerRenderInformation ( ) ;
2012-09-08 18:48:24 +02:00
proxy . loadConfiguration ( ) ;
2012-08-15 22:41:41 +02:00
proxy . loadUtilities ( ) ;
proxy . loadTickHandler ( ) ;
2012-11-09 03:22:18 +01:00
MinecraftForge . EVENT_BUS . register ( this ) ;
2012-10-03 21:12:17 +02:00
//Attempt to load server commands
try {
registerServerCommands ( ) ;
} catch ( NoSuchMethodError e ) { }
2012-09-08 18:48:24 +02:00
2012-11-28 16:33:34 +01:00
//Load this module
2012-08-15 22:41:41 +02:00
addItems ( ) ;
addBlocks ( ) ;
addNames ( ) ;
addTextures ( ) ;
addRecipes ( ) ;
addEntities ( ) ;
2012-11-28 16:33:34 +01:00
System . out . println ( " [Mekanism] Loading complete. " ) ;
2012-08-15 22:41:41 +02:00
//Success message
2012-11-05 20:29:04 +01:00
logger . info ( " [Mekanism] Mod loaded. " ) ;
2012-08-15 22:41:41 +02:00
}
}