2012-11-05 20:29:04 +01:00
package mekanism.common ;
2012-08-19 04:29:38 +02:00
2013-04-19 21:43:00 +02:00
import ic2.api.recipe.Recipes ;
2012-10-02 20:39:40 +02:00
2013-03-18 17:23:57 +01:00
import java.io.File ;
2013-01-21 02:15:59 +01:00
import java.util.ArrayList ;
import java.util.HashMap ;
2013-04-28 21:23:08 +02:00
import java.util.HashSet ;
2013-04-05 22:26:48 +02:00
import java.util.List ;
2013-01-21 02:15:59 +01:00
import java.util.Map ;
2012-08-15 22:41:41 +02:00
import java.util.logging.Logger ;
2013-04-23 21:36:43 +02:00
import mekanism.api.GasTransferProtocol.GasTransferEvent ;
2013-02-14 19:26:13 +01:00
import mekanism.api.InfuseObject ;
2013-06-02 03:33:19 +02:00
import mekanism.api.InfuseRegistry ;
import mekanism.api.InfuseType ;
2013-06-13 23:37:30 +02:00
import mekanism.api.InfusionInput ;
2013-04-28 21:23:08 +02:00
import mekanism.api.Object3D ;
2012-11-05 20:29:04 +01:00
import mekanism.client.SoundHandler ;
2013-04-28 21:23:08 +02:00
import mekanism.common.EnergyTransferProtocol.EnergyTransferEvent ;
2013-03-25 17:00:45 +01:00
import mekanism.common.IFactory.RecipeType ;
2013-04-28 21:23:08 +02:00
import mekanism.common.LiquidTransferProtocol.LiquidTransferEvent ;
2013-06-13 23:37:30 +02:00
import mekanism.common.PacketHandler.Transmission ;
2013-04-01 01:12:10 +02:00
import mekanism.common.Tier.EnergyCubeTier ;
import mekanism.common.Tier.FactoryTier ;
2013-06-13 23:37:30 +02:00
import mekanism.common.network.PacketConfiguratorState ;
import mekanism.common.network.PacketControlPanel ;
import mekanism.common.network.PacketDataRequest ;
import mekanism.common.network.PacketDigitUpdate ;
import mekanism.common.network.PacketElectricBowState ;
import mekanism.common.network.PacketElectricChest ;
import mekanism.common.network.PacketPortableTeleport ;
import mekanism.common.network.PacketPortalFX ;
import mekanism.common.network.PacketRobit ;
import mekanism.common.network.PacketStatusUpdate ;
import mekanism.common.network.PacketTileEntity ;
import mekanism.common.network.PacketTime ;
import mekanism.common.network.PacketTransmitterTransferUpdate ;
import mekanism.common.network.PacketTransmitterTransferUpdate.TransmitterTransferType ;
import mekanism.common.network.PacketWeather ;
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 ;
2013-04-23 21:36:43 +02:00
import net.minecraftforge.event.ForgeSubscribe ;
2012-11-03 03:27:30 +01:00
import net.minecraftforge.oredict.OreDictionary ;
2013-03-20 21:28:45 +01:00
import net.minecraftforge.oredict.ShapelessOreRecipe ;
2013-06-13 23:37:30 +02:00
import rebelkeithy.mods.metallurgy.api.IOreInfo ;
import rebelkeithy.mods.metallurgy.api.MetallurgyAPI ;
2013-03-18 17:23:57 +01:00
import thermalexpansion.api.crafting.CraftingManagers ;
2012-12-20 22:53:39 +01:00
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 ;
2013-02-14 19:26:13 +01:00
import cpw.mods.fml.common.Mod.ServerStarting ;
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 ;
2013-02-14 19:26:13 +01:00
import cpw.mods.fml.common.event.FMLServerStartingEvent ;
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
/ * *
2013-04-23 00:15:03 +02:00
* Mekanism - the mod in which no true definition fits .
2012-08-15 22:41:41 +02:00
* @author AidanBrady
*
* /
2013-05-20 00:43:01 +02:00
@Mod ( modid = " Mekanism " , name = " Mekanism " , version = " 5.5.6 " )
2013-06-14 03:45:29 +02:00
@NetworkMod ( channels = { " MEK " } , clientSideRequired = true , serverSideRequired = false , packetHandler = PacketHandler . class )
2012-11-05 20:29:04 +01:00
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 ;
2013-05-28 06:29:29 +02:00
/** Mekanism debug mode */
public static boolean debug = false ;
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-05-20 00:43:01 +02:00
public static Version versionNumber = new Version ( 5 , 5 , 6 ) ;
2013-01-21 02:15:59 +01:00
2013-02-25 21:02:05 +01:00
/** Map of Teleporters */
2013-04-28 21:23:08 +02:00
public static Map < Teleporter . Code , ArrayList < Object3D > > teleporters = new HashMap < Teleporter . Code , ArrayList < Object3D > > ( ) ;
2012-09-20 15:59:30 +02:00
2013-05-07 21:57:55 +02:00
/** A map containing references to all dynamic tank inventory caches. */
2013-04-28 21:23:08 +02:00
public static Map < Integer , DynamicTankCache > dynamicInventories = new HashMap < Integer , DynamicTankCache > ( ) ;
2013-05-07 21:57:55 +02:00
/** A map containing references to all locations corresponding to a specific inventory ID. */
2013-04-28 21:23:08 +02:00
public static Map < Integer , HashSet < Object3D > > inventoryLocations = new HashMap < Integer , HashSet < Object3D > > ( ) ;
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
2013-04-05 22:26:48 +02:00
/** List of Mekanism modules loaded */
2013-04-06 19:28:59 +02:00
public static List < IModule > modulesLoaded = new ArrayList < IModule > ( ) ;
2013-04-05 22:26:48 +02: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-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-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 ;
2013-03-11 18:49:01 +01:00
public static int boundingBlockID = 3005 ;
2012-12-30 22:34:45 +01:00
public static int gasTankID = 3006 ;
2013-03-25 17:00:45 +01:00
public static int transmitterID = 3007 ;
2012-08-15 22:41:41 +02:00
2013-02-25 21:02:05 +01:00
//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 ;
2013-05-20 00:43:01 +02:00
public static ItemRobit Robit ;
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 ;
2013-01-21 02:15:59 +01:00
public static Item PortableTeleporter ;
public static Item TeleportationCore ;
2013-01-25 00:01:59 +01:00
public static Item Configurator ;
2012-08-15 22:41:41 +02:00
2013-03-11 18:49:01 +01:00
//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 ;
2013-03-11 18:49:01 +01:00
public static Block BoundingBlock ;
2012-11-21 16:14:35 +01:00
public static Block GasTank ;
2013-03-25 17:00:45 +01:00
public static Block Transmitter ;
2012-11-21 16:14:35 +01:00
2013-03-11 18:49:01 +01:00
//Multi-ID Items
2012-11-02 02:30:40 +01:00
public static Item Dust ;
public static Item Ingot ;
2013-01-23 21:42:45 +01:00
public static Item Clump ;
public static Item DirtyDust ;
2012-11-02 02:30:40 +01:00
2013-03-18 17:23:57 +01:00
//Config Values
2012-08-20 18:29:31 +02:00
public static boolean extrasEnabled = true ;
2013-02-27 02:21:30 +01:00
public static boolean osmiumGenerationEnabled = true ;
2013-01-21 02:15:59 +01:00
public static boolean disableBCBronzeCrafting = true ;
public static boolean disableBCSteelCrafting = true ;
2013-01-30 13:53:36 +01:00
public static boolean updateNotifications = true ;
2013-02-14 19:26:13 +01:00
public static boolean enableSounds = true ;
public static boolean controlCircuitOreDict = true ;
2013-03-31 00:13:59 +01:00
public static boolean logPackets = false ;
2013-05-14 17:34:26 +02:00
public static boolean dynamicTankEasterEgg = false ;
2013-03-18 17:23:57 +01:00
public static int obsidianTNTBlastRadius = 12 ;
public static int obsidianTNTDelay = 100 ;
2013-03-29 17:10:23 +01:00
public static double TO_IC2 ;
public static double TO_BC ;
public static double FROM_IC2 ;
public static double FROM_BC ;
2013-05-21 02:37:52 +02:00
public static double ENERGY_PER_REDSTONE = 10000 ;
2012-08-15 22:41:41 +02:00
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 ;
/ * *
* Adds all in - game crafting and smelting recipes .
* /
public void addRecipes ( )
{
2013-02-25 21:02:05 +01:00
//Storage Recipes
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 1 , 3 ) , new Object [ ] {
2012-11-25 16:45:00 +01:00
" *** " , " *** " , " *** " , Character . valueOf ( '*' ) , Item . coal
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 1 , 2 ) , new Object [ ] {
2013-01-23 21:42:45 +01:00
" *** " , " *** " , " *** " , Character . valueOf ( '*' ) , " ingotRefinedObsidian "
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 1 , 4 ) , new Object [ ] {
2013-01-23 21:42:45 +01:00
" *** " , " *** " , " *** " , Character . valueOf ( '*' ) , " ingotRefinedGlowstone "
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 1 , 0 ) , new Object [ ] {
2013-02-27 02:21:30 +01:00
" XXX " , " XXX " , " XXX " , Character . valueOf ( 'X' ) , " ingotOsmium "
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( Ingot , 9 , 4 ) , new Object [ ] {
2013-02-14 19:26:13 +01:00
" * " , Character . valueOf ( '*' ) , new ItemStack ( BasicBlock , 1 , 5 )
} ) ) ;
2012-08-15 22:41:41 +02:00
2013-02-25 21:02:05 +01:00
//Base Recipes
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 0 ) , new Object [ ] {
2013-04-01 01:12:10 +02:00
" ARA " , " CIC " , " ARA " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 8 ) , Character . valueOf ( 'C' ) , ControlCircuit
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 1 ) , new Object [ ] {
2013-04-01 01:12:10 +02:00
" RCR " , " GIG " , " RCR " , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'G' ) , Block . glass , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 8 )
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 2 ) , new Object [ ] {
2013-04-01 01:12:10 +02:00
" SCS " , " RIR " , " SCS " , Character . valueOf ( 'S' ) , Block . cobblestone , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 8 )
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 3 ) , new Object [ ] {
2013-04-01 01:12:10 +02:00
" RLR " , " CIC " , " RLR " , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'L' ) , Item . bucketLava , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 8 )
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( SpeedUpgrade ) , new Object [ ] {
2013-02-27 02:21:30 +01:00
" G " , " APA " , " G " , Character . valueOf ( 'P' ) , " dustOsmium " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'G' ) , Block . glass
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( EnergyUpgrade ) , new Object [ ] {
2013-02-22 04:03:54 +01:00
" G " , " ADA " , " G " , Character . valueOf ( 'G' ) , Block . glass , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'D' ) , " dustGold "
2012-11-07 02:44:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( AtomicCore ) , new Object [ ] {
2013-02-27 02:21:30 +01:00
" AOA " , " PDP " , " AOA " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'O' ) , " dustObsidian " , Character . valueOf ( 'P' ) , " dustOsmium " , Character . valueOf ( 'D' ) , Item . diamond
2012-11-09 03:22:18 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( AtomicDisassembler . getUnchargedItem ( ) , new Object [ ] {
2013-01-23 21:42:45 +01:00
" AEA " , " ACA " , " O " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'E' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'C' ) , AtomicCore , Character . valueOf ( 'O' ) , " ingotRefinedObsidian "
2012-11-09 03:22:18 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( StorageTank . getEmptyItem ( ) , new Object [ ] {
2012-11-15 21:04:12 +01:00
" III " , " IDI " , " III " , Character . valueOf ( 'I' ) , Item . ingotIron , Character . valueOf ( 'D' ) , " dustIron "
} ) ) ;
2013-06-07 17:16:47 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( GasTank ) , new Object [ ] {
2013-02-27 02:21:30 +01:00
" PPP " , " PDP " , " PPP " , Character . valueOf ( 'P' ) , " ingotOsmium " , Character . valueOf ( 'D' ) , " dustIron "
2012-11-21 16:14:35 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getEnergyCube ( EnergyCubeTier . BASIC ) , new Object [ ] {
2013-04-01 01:12:10 +02:00
" RLR " , " TIT " , " RLR " , Character . valueOf ( 'R' ) , Item . redstone , Character . valueOf ( 'L' ) , new ItemStack ( Item . dyePowder , 1 , 4 ) , Character . valueOf ( 'T' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 8 )
2012-11-28 17:26:52 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getEnergyCube ( EnergyCubeTier . ADVANCED ) , new Object [ ] {
2013-03-20 16:14:26 +01:00
" EGE " , " TBT " , " EGE " , Character . valueOf ( 'E' ) , EnrichedAlloy , Character . valueOf ( 'G' ) , Item . ingotGold , Character . valueOf ( 'T' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'B' ) , MekanismUtils . getEnergyCube ( EnergyCubeTier . BASIC )
2012-11-28 17:26:52 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getEnergyCube ( EnergyCubeTier . ELITE ) , new Object [ ] {
2013-03-20 16:14:26 +01:00
" CDC " , " TAT " , " CDC " , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'D' ) , Item . diamond , Character . valueOf ( 'T' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'A' ) , MekanismUtils . getEnergyCube ( EnergyCubeTier . ADVANCED )
2013-02-22 21:28:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getEnergyCube ( EnergyCubeTier . ULTIMATE ) , new Object [ ] {
2013-03-20 16:14:26 +01:00
" COC " , " TAT " , " COC " , Character . valueOf ( 'C' ) , AtomicCore , Character . valueOf ( 'O' ) , " ingotRefinedObsidian " , Character . valueOf ( 'T' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'A' ) , MekanismUtils . getEnergyCube ( EnergyCubeTier . ELITE )
2012-11-28 17:26:52 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( ControlCircuit ) , new Object [ ] {
2013-02-27 02:21:30 +01:00
" P " , " PEP " , " P " , Character . valueOf ( 'P' ) , " ingotOsmium " , Character . valueOf ( 'E' ) , EnrichedAlloy
2012-12-09 06:24:27 +01:00
} ) ) ;
2013-03-20 21:28:45 +01:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new ShapelessOreRecipe ( new ItemStack ( EnrichedIron , 2 ) , new Object [ ] {
Item . redstone , Item . ingotIron
2012-12-09 19:03:49 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 8 ) , new Object [ ] {
2013-03-18 17:23:57 +01:00
" IFI " , " CEC " , " IFI " , Character . valueOf ( 'I' ) , Item . ingotIron , Character . valueOf ( 'F' ) , Block . furnaceIdle , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'E' ) , EnrichedAlloy
2013-01-21 02:15:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( TeleportationCore ) , new Object [ ] {
2013-01-21 02:15:59 +01:00
" LAL " , " GDG " , " LAL " , Character . valueOf ( 'L' ) , new ItemStack ( Item . dyePowder , 1 , 4 ) , Character . valueOf ( 'A' ) , AtomicCore , Character . valueOf ( 'G' ) , Item . ingotGold , Character . valueOf ( 'D' ) , Item . diamond
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( PortableTeleporter ) , new Object [ ] {
2013-01-21 02:15:59 +01:00
" E " , " CTC " , " E " , Character . valueOf ( 'E' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'T' ) , TeleportationCore
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 11 ) , new Object [ ] {
2013-01-30 13:53:36 +01:00
" COC " , " OTO " , " COC " , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'O' ) , new ItemStack ( BasicBlock , 1 , 8 ) , Character . valueOf ( 'T' ) , TeleportationCore
2012-12-21 14:30:40 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 9 ) , new Object [ ] {
2013-04-01 01:12:10 +02:00
" CAC " , " ERE " , " CAC " , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'A' ) , AtomicCore , Character . valueOf ( 'E' ) , EnrichedAlloy , Character . valueOf ( 'R' ) , new ItemStack ( BasicBlock , 1 , 8 )
2013-01-25 00:01:59 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( Configurator ) , new Object [ ] {
2013-01-25 00:01:59 +01:00
" L " , " AEA " , " S " , Character . valueOf ( 'L' ) , new ItemStack ( Item . dyePowder , 1 , 4 ) , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'E' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'S' ) , Item . stick
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 9 , 7 ) , new Object [ ] {
2013-01-30 13:53:36 +01:00
" OOO " , " OGO " , " OOO " , Character . valueOf ( 'O' ) , " ingotRefinedObsidian " , Character . valueOf ( 'G' ) , " ingotRefinedGlowstone "
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( Transmitter , 8 , 0 ) , new Object [ ] {
2013-04-06 19:28:59 +02:00
" OGO " , Character . valueOf ( 'O' ) , " ingotOsmium " , Character . valueOf ( 'G' ) , Block . glass
2013-02-22 04:03:54 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 1 , 8 ) , new Object [ ] {
2013-03-22 02:28:36 +01:00
" S " , " SPS " , " S " , Character . valueOf ( 'S' ) , " ingotSteel " , Character . valueOf ( 'P' ) , " ingotOsmium "
2013-03-20 21:28:45 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 10 ) , new Object [ ] {
2013-04-01 01:12:10 +02:00
" SCS " , " GIG " , " SCS " , Character . valueOf ( 'S' ) , Block . cobblestone , Character . valueOf ( 'C' ) , ControlCircuit , Character . valueOf ( 'G' ) , Block . glass , Character . valueOf ( 'I' ) , new ItemStack ( BasicBlock , 1 , 8 )
2013-03-20 21:28:45 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( Transmitter , 8 , 1 ) , new Object [ ] {
2013-04-06 19:28:59 +02:00
" ORO " , Character . valueOf ( 'O' ) , " ingotOsmium " , Character . valueOf ( 'R' ) , Item . redstone
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 12 ) , new Object [ ] {
2013-04-13 02:25:21 +02:00
" B " , " ECE " , " OOO " , Character . valueOf ( 'B' ) , Item . bucketEmpty , Character . valueOf ( 'E' ) , EnrichedAlloy , Character . valueOf ( 'C' ) , new ItemStack ( BasicBlock , 1 , 8 ) , Character . valueOf ( 'O' ) , " ingotOsmium "
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 13 ) , new Object [ ] {
2013-04-13 02:25:21 +02:00
" SGS " , " CcC " , " SSS " , Character . valueOf ( 'S' ) , " ingotSteel " , Character . valueOf ( 'G' ) , Block . glass , Character . valueOf ( 'C' ) , Block . chest , Character . valueOf ( 'c' ) , ControlCircuit
2013-03-25 17:00:45 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( Transmitter , 8 , 2 ) , new Object [ ] {
2013-06-07 17:16:47 +02:00
" OBO " , Character . valueOf ( 'O' ) , " ingotOsmium " , Character . valueOf ( 'B' ) , Item . bucketEmpty
2013-04-21 06:34:54 +02:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 4 , 9 ) , new Object [ ] {
2013-05-01 03:30:43 +02:00
" I " , " ISI " , " I " , Character . valueOf ( 'I' ) , " ingotSteel " , Character . valueOf ( 'S' ) , Block . cobblestone
2013-04-28 22:04:16 +02:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 4 , 10 ) , new Object [ ] {
2013-05-01 03:30:43 +02:00
" I " , " IGI " , " I " , Character . valueOf ( 'I' ) , " ingotSteel " , Character . valueOf ( 'G' ) , Block . glass
2013-04-28 22:04:16 +02:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( BasicBlock , 1 , 11 ) , new Object [ ] {
2013-05-01 03:30:43 +02:00
" I " , " ICI " , " I " , Character . valueOf ( 'I' ) , " ingotSteel " , Character . valueOf ( 'C' ) , ControlCircuit
2013-04-28 22:04:16 +02:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( new ItemStack ( MachineBlock , 1 , 14 ) , new Object [ ] {
2013-05-20 00:43:01 +02:00
" PPP " , " SES " , Character . valueOf ( 'P' ) , Block . pressurePlateStone , Character . valueOf ( 'S' ) , " ingotSteel " , Character . valueOf ( 'E' ) , EnergyTablet . getUnchargedItem ( )
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( Robit . getUnchargedItem ( ) , new Object [ ] {
2013-05-20 19:51:18 +02:00
" S " , " ECE " , " OIO " , Character . valueOf ( 'S' ) , " ingotSteel " , Character . valueOf ( 'E' ) , EnergyTablet . getUnchargedItem ( ) , Character . valueOf ( 'C' ) , AtomicCore , Character . valueOf ( 'O' ) , " ingotRefinedObsidian " , Character . valueOf ( 'I' ) , new ItemStack ( MachineBlock , 1 , 13 )
} ) ) ;
2012-09-25 21:15:47 +02:00
2013-03-20 16:14:26 +01:00
//Factory Recipes
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getFactory ( FactoryTier . BASIC , RecipeType . SMELTING ) , new Object [ ] {
2013-03-20 21:28:45 +01:00
" CAC " , " GOG " , " CAC " , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'G' ) , " dustGold " , Character . valueOf ( 'O' ) , new ItemStack ( MachineBlock , 1 , 10 )
2013-03-20 16:14:26 +01:00
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getFactory ( FactoryTier . BASIC , RecipeType . ENRICHING ) , new Object [ ] {
2013-03-20 16:14:26 +01:00
" CAC " , " GOG " , " CAC " , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'G' ) , " dustGold " , Character . valueOf ( 'O' ) , new ItemStack ( MachineBlock , 1 , 0 )
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getFactory ( FactoryTier . BASIC , RecipeType . CRUSHING ) , new Object [ ] {
2013-03-20 16:14:26 +01:00
" CAC " , " GOG " , " CAC " , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'G' ) , " dustGold " , Character . valueOf ( 'O' ) , new ItemStack ( MachineBlock , 1 , 3 )
} ) ) ;
for ( RecipeType type : RecipeType . values ( ) )
{
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getFactory ( FactoryTier . ADVANCED , type ) , new Object [ ] {
2013-03-20 16:14:26 +01:00
" CAC " , " DOD " , " CAC " , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'D' ) , " dustDiamond " , Character . valueOf ( 'O' ) , MekanismUtils . getFactory ( FactoryTier . BASIC , type )
} ) ) ;
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( MekanismUtils . getFactory ( FactoryTier . ELITE , type ) , new Object [ ] {
2013-03-20 16:14:26 +01:00
" CAC " , " cOc " , " CAC " , Character . valueOf ( 'C' ) , " basicCircuit " , Character . valueOf ( 'A' ) , EnrichedAlloy , Character . valueOf ( 'c' ) , AtomicCore , Character . valueOf ( 'O' ) , MekanismUtils . getFactory ( FactoryTier . ADVANCED , type )
} ) ) ;
}
2012-09-25 21:15:47 +02:00
if ( extrasEnabled )
{
2013-06-01 18:37:43 +02:00
CraftingManager . getInstance ( ) . getRecipeList ( ) . add ( new MekanismRecipe ( 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 ) ;
2013-01-21 02:15:59 +01:00
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . itemID , 2 , new ItemStack ( Ingot , 1 , 1 ) , 1 . 0F ) ;
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . itemID , 0 , new ItemStack ( Item . ingotIron ) , 1 . 0F ) ;
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . itemID , 1 , new ItemStack ( Item . ingotGold ) , 1 . 0F ) ;
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . itemID , 5 , new ItemStack ( Ingot , 1 , 4 ) , 1 . 0F ) ;
2013-03-20 21:28:45 +01:00
FurnaceRecipes . smelting ( ) . addSmelting ( EnrichedIron . itemID , 0 , new ItemStack ( EnrichedAlloy ) , 1 . 0F ) ;
2012-09-25 21:15:47 +02:00
//Enrichment Chamber Recipes
2013-03-18 17:23:57 +01:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreRedstone ) , new ItemStack ( Item . redstone , 12 ) ) ;
2013-02-22 04:03:54 +01:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . obsidian ) , new ItemStack ( DirtyDust , 1 , 6 ) ) ;
2013-05-09 14:56:36 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Item . coal , 1 , 0 ) , new ItemStack ( CompressedCarbon ) ) ;
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Item . coal , 1 , 1 ) , new ItemStack ( CompressedCarbon ) ) ;
2013-01-30 13:53:36 +01:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreLapis ) , new ItemStack ( Item . dyePowder , 12 , 4 ) ) ;
2013-05-09 14:56:36 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreCoal ) , new ItemStack ( Item . coal , 2 ) ) ;
2013-01-30 13:53:36 +01:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreDiamond ) , new ItemStack ( Item . diamond , 2 ) ) ;
2013-02-22 04:03:54 +01:00
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . cobblestoneMossy ) , new ItemStack ( Block . cobblestone ) ) ;
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . stone ) , new ItemStack ( Block . stoneBrick , 1 , 2 ) ) ;
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . stoneBrick , 1 , 2 ) , new ItemStack ( Block . stoneBrick , 1 , 0 ) ) ;
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . stoneBrick , 1 , 0 ) , new ItemStack ( Block . stoneBrick , 1 , 3 ) ) ;
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . stoneBrick , 1 , 1 ) , new ItemStack ( Block . stoneBrick , 1 , 0 ) ) ;
2012-09-25 21:15:47 +02:00
2013-03-18 17:23:57 +01:00
//Combiner recipes
RecipeHandler . addCombinerRecipe ( new ItemStack ( Item . redstone , 16 ) , new ItemStack ( Block . oreRedstone ) ) ;
RecipeHandler . addCombinerRecipe ( new ItemStack ( Item . dyePowder , 16 , 4 ) , new ItemStack ( Block . oreLapis ) ) ;
2013-02-27 02:21:30 +01:00
//Osmium Compressor Recipes
RecipeHandler . addOsmiumCompressorRecipe ( new ItemStack ( Item . lightStoneDust ) , new ItemStack ( Ingot , 1 , 3 ) ) ;
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 ) ) ;
2013-01-30 13:53:36 +01:00
RecipeHandler . addCrusherRecipe ( new ItemStack ( Block . gravel ) , new ItemStack ( Item . flint ) ) ;
RecipeHandler . addCrusherRecipe ( new ItemStack ( Block . stone ) , new ItemStack ( Block . cobblestone ) ) ;
RecipeHandler . addCrusherRecipe ( new ItemStack ( Block . cobblestone ) , new ItemStack ( Block . sand ) ) ;
2013-02-22 04:03:54 +01:00
RecipeHandler . addCrusherRecipe ( new ItemStack ( Block . stoneBrick , 1 , 2 ) , new ItemStack ( Block . stone ) ) ;
RecipeHandler . addCrusherRecipe ( new ItemStack ( Block . stoneBrick , 1 , 0 ) , new ItemStack ( Block . stoneBrick , 1 , 2 ) ) ;
RecipeHandler . addCrusherRecipe ( new ItemStack ( Block . stoneBrick , 1 , 3 ) , new ItemStack ( Block . stoneBrick , 1 , 0 ) ) ;
2012-10-02 20:39:40 +02:00
2012-12-20 22:53:39 +01:00
//Metallurgic Infuser Recipes
2013-06-02 03:33:19 +02:00
RecipeHandler . addMetallurgicInfuserRecipe ( InfusionInput . getInfusion ( InfuseRegistry . get ( " CARBON " ) , 10 , new ItemStack ( EnrichedIron ) ) , new ItemStack ( Dust , 1 , 5 ) ) ;
if ( InfuseRegistry . contains ( " BIO " ) )
{
RecipeHandler . addMetallurgicInfuserRecipe ( InfusionInput . getInfusion ( InfuseRegistry . get ( " BIO " ) , 10 , new ItemStack ( Block . cobblestone ) ) , new ItemStack ( Block . cobblestoneMossy ) ) ;
RecipeHandler . addMetallurgicInfuserRecipe ( InfusionInput . getInfusion ( InfuseRegistry . get ( " BIO " ) , 10 , new ItemStack ( Block . stoneBrick , 1 , 0 ) ) , new ItemStack ( Block . stoneBrick , 1 , 1 ) ) ;
}
2013-02-14 19:26:13 +01:00
2013-06-02 03:33:19 +02:00
InfuseRegistry . registerInfuseObject ( new ItemStack ( Item . coal , 1 , 0 ) , new InfuseObject ( InfuseRegistry . get ( " CARBON " ) , 10 ) ) ;
InfuseRegistry . registerInfuseObject ( new ItemStack ( Item . coal , 1 , 1 ) , new InfuseObject ( InfuseRegistry . get ( " CARBON " ) , 20 ) ) ;
InfuseRegistry . registerInfuseObject ( new ItemStack ( CompressedCarbon ) , new InfuseObject ( InfuseRegistry . get ( " CARBON " ) , 100 ) ) ;
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-15 22:41:41 +02:00
}
2012-09-08 18:48:24 +02:00
2013-02-14 19:26:13 +01:00
LanguageRegistry . addName ( EnrichedAlloy , " Enriched Alloy " ) ;
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 " ) ;
2013-05-20 00:43:01 +02:00
LanguageRegistry . addName ( Robit , " Robit " ) ;
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 " ) ;
2013-03-11 18:49:01 +01:00
LanguageRegistry . addName ( BoundingBlock , " Bounding Block " ) ;
2012-11-21 16:14:35 +01:00
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 " ) ;
2013-01-21 02:15:59 +01:00
LanguageRegistry . addName ( PortableTeleporter , " Portable Teleporter " ) ;
LanguageRegistry . addName ( TeleportationCore , " Teleportation Core " ) ;
2013-01-25 00:01:59 +01:00
LanguageRegistry . addName ( Configurator , " Configurator " ) ;
2012-10-02 20:39:40 +02:00
2013-03-31 00:13:59 +01:00
//Localization for BasicBlock
2013-02-27 02:21:30 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.OsmiumBlock.name " , " Osmium 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 " ) ;
2013-01-30 13:53:36 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.TeleporterFrame.name " , " Teleporter Frame " ) ;
2013-03-20 21:28:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.SteelCasing.name " , " Steel Casing " ) ;
2013-04-28 21:23:08 +02:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.DynamicTank.name " , " Dynamic Tank " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.DynamicGlass.name " , " Dynamic Glass " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.BasicBlock.DynamicValve.name " , " Dynamic Valve " ) ;
2012-09-25 21:15:47 +02:00
//Localization for MachineBlock
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.EnrichmentChamber.name " , " Enrichment Chamber " ) ;
2013-02-27 02:21:30 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.OsmiumCompressor.name " , " Osmium Compressor " ) ;
2012-09-25 21:15:47 +02:00
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 " ) ;
2013-03-20 16:14:26 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.BasicFactory.name " , " Basic Factory " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.AdvancedFactory.name " , " Advanced Factory " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.EliteFactory.name " , " Elite Factory " ) ;
2012-12-20 22:53:39 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.MetallurgicInfuser.name " , " Metallurgic Infuser " ) ;
2013-01-23 21:42:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.PurificationChamber.name " , " Purification Chamber " ) ;
2013-03-20 21:28:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.EnergizedSmelter.name " , " Energized Smelter " ) ;
2013-03-31 00:13:59 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.Teleporter.name " , " Teleporter " ) ;
2013-04-03 21:37:26 +02:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.ElectricPump.name " , " Electric Pump " ) ;
2013-04-13 02:25:21 +02:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.ElectricChest.name " , " Electric Chest " ) ;
2013-05-20 00:43:01 +02:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.MachineBlock.Chargepad.name " , " Chargepad " ) ;
2012-09-25 21:15:47 +02:00
//Localization for OreBlock
2013-02-27 02:21:30 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.OreBlock.OsmiumOre.name " , " Osmium Ore " ) ;
2012-09-25 21:15:47 +02:00
2013-03-25 17:00:45 +01:00
//Localization for Transmitter
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.Transmitter.PressurizedTube.name " , " Pressurized Tube " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.Transmitter.UniversalCable.name " , " Universal Cable " ) ;
2013-04-18 04:40:11 +02:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.Transmitter.MechanicalPipe.name " , " Mechanical Pipe " ) ;
2013-03-25 17:00:45 +01:00
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 " ) ;
2013-01-21 02:15:59 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " tile.EnergyCube.Elite.name " , " Elite Energy Cube " ) ;
2013-02-22 21:28:59 +01:00
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 " ) ;
2013-02-27 02:21:30 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.osmiumDust.name " , " Osmium Dust " ) ;
2013-02-22 04:03:54 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.obsidianDust.name " , " Refined 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 " ) ;
2013-01-12 15:52:41 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.copperDust.name " , " Copper Dust " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.tinDust.name " , " Tin Dust " ) ;
2013-02-01 01:43:39 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.silverDust.name " , " Silver Dust " ) ;
2012-11-02 02:30:40 +01:00
2013-01-23 21:42:45 +01:00
//Localization for Clump
LanguageRegistry . instance ( ) . addStringLocalization ( " item.ironClump.name " , " Iron Clump " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.goldClump.name " , " Gold Clump " ) ;
2013-02-27 02:21:30 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.osmiumClump.name " , " Osmium Clump " ) ;
2013-01-23 21:42:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.copperClump.name " , " Copper Clump " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.tinClump.name " , " Tin Clump " ) ;
2013-02-01 01:43:39 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.silverClump.name " , " Silver Clump " ) ;
2013-01-23 21:42:45 +01:00
//Localization for Dirty Dust
LanguageRegistry . instance ( ) . addStringLocalization ( " item.dirtyIronDust.name " , " Dirty Iron Dust " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.dirtyGoldDust.name " , " Dirty Gold Dust " ) ;
2013-02-27 02:21:30 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.dirtyOsmiumDust.name " , " Dirty Osmium Dust " ) ;
2013-01-23 21:42:45 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.dirtyCopperDust.name " , " Dirty Copper Dust " ) ;
LanguageRegistry . instance ( ) . addStringLocalization ( " item.dirtyTinDust.name " , " Dirty Tin Dust " ) ;
2013-02-01 01:43:39 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.dirtySilverDust.name " , " Dirty Silver Dust " ) ;
2013-02-22 04:03:54 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.dirtyObsidianDust.name " , " Dirty Obsidian Dust " ) ;
2013-01-23 21:42:45 +01:00
2012-11-02 02:30:40 +01:00
//Localization for Ingot
LanguageRegistry . instance ( ) . addStringLocalization ( " item.obsidianIngot.name " , " Obsidian Ingot " ) ;
2013-02-27 02:21:30 +01:00
LanguageRegistry . instance ( ) . addStringLocalization ( " item.osmiumIngot.name " , " Osmium 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 and registers all items .
* /
public void addItems ( )
2013-04-19 21:43:00 +02:00
{
//Declarations
2013-01-12 15:52:41 +01:00
configuration . load ( ) ;
2013-03-18 17:23:57 +01:00
ElectricBow = ( ItemElectricBow ) new ItemElectricBow ( configuration . getItem ( " ElectricBow " , 11200 ) . getInt ( ) ) . setUnlocalizedName ( " ElectricBow " ) ;
2013-04-19 21:43:00 +02:00
2012-08-20 18:29:31 +02:00
if ( extrasEnabled = = true )
2012-08-15 22:41:41 +02:00
{
2013-03-18 17:23:57 +01:00
Stopwatch = new ItemStopwatch ( configuration . getItem ( " Stopwatch " , 11202 ) . getInt ( ) ) . setUnlocalizedName ( " Stopwatch " ) ;
WeatherOrb = new ItemWeatherOrb ( configuration . getItem ( " WeatherOrb " , 11203 ) . getInt ( ) ) . setUnlocalizedName ( " WeatherOrb " ) ;
2012-08-15 22:41:41 +02:00
}
2013-04-19 21:43:00 +02:00
2013-01-12 15:52:41 +01:00
Dust = new ItemDust ( configuration . getItem ( " Dust " , 11204 ) . getInt ( ) - 256 ) ;
Ingot = new ItemIngot ( configuration . getItem ( " Ingot " , 11205 ) . getInt ( ) - 256 ) ;
2013-03-18 17:23:57 +01:00
EnergyTablet = ( ItemEnergized ) new ItemEnergized ( configuration . getItem ( " EnergyTablet " , 11206 ) . getInt ( ) , 1000000 , 120 ) . setUnlocalizedName ( " EnergyTablet " ) ;
SpeedUpgrade = new ItemMachineUpgrade ( configuration . getItem ( " SpeedUpgrade " , 11207 ) . getInt ( ) , 0 , 150 ) . setUnlocalizedName ( " SpeedUpgrade " ) ;
EnergyUpgrade = new ItemMachineUpgrade ( configuration . getItem ( " EnergyUpgrade " , 11208 ) . getInt ( ) , 1000 , 0 ) . setUnlocalizedName ( " EnergyUpgrade " ) ;
2013-05-20 00:43:01 +02:00
Robit = ( ItemRobit ) new ItemRobit ( configuration . getItem ( " Robit " , 11209 ) . getInt ( ) ) . setUnlocalizedName ( " Robit " ) ;
2013-03-18 17:23:57 +01:00
AtomicDisassembler = ( ItemAtomicDisassembler ) new ItemAtomicDisassembler ( configuration . getItem ( " AtomicDisassembler " , 11210 ) . getInt ( ) ) . setUnlocalizedName ( " AtomicDisassembler " ) ;
AtomicCore = new ItemMekanism ( configuration . getItem ( " AtomicCore " , 11211 ) . getInt ( ) ) . setUnlocalizedName ( " AtomicCore " ) ;
EnrichedAlloy = new ItemMekanism ( configuration . getItem ( " EnrichedAlloy " , 11212 ) . getInt ( ) ) . setUnlocalizedName ( " EnrichedAlloy " ) ;
StorageTank = ( ItemStorageTank ) new ItemStorageTank ( configuration . getItem ( " StorageTank " , 11213 ) . getInt ( ) , 1600 , 16 ) . setUnlocalizedName ( " StorageTank " ) ;
ControlCircuit = new ItemMekanism ( configuration . getItem ( " ControlCircuit " , 11214 ) . getInt ( ) ) . setUnlocalizedName ( " ControlCircuit " ) ;
EnrichedIron = new ItemMekanism ( configuration . getItem ( " EnrichedIron " , 11215 ) . getInt ( ) ) . setUnlocalizedName ( " EnrichedIron " ) ;
CompressedCarbon = new ItemMekanism ( configuration . getItem ( " CompressedCarbon " , 11216 ) . getInt ( ) ) . setUnlocalizedName ( " CompressedCarbon " ) ;
PortableTeleporter = new ItemPortableTeleporter ( configuration . getItem ( " PortableTeleporter " , 11217 ) . getInt ( ) ) . setUnlocalizedName ( " PortableTeleporter " ) ;
TeleportationCore = new ItemMekanism ( configuration . getItem ( " TeleportationCore " , 11218 ) . getInt ( ) ) . setUnlocalizedName ( " TeleportationCore " ) ;
2013-01-23 21:42:45 +01:00
Clump = new ItemClump ( configuration . getItem ( " Clump " , 11219 ) . getInt ( ) - 256 ) ;
DirtyDust = new ItemDirtyDust ( configuration . getItem ( " DirtyDust " , 11220 ) . getInt ( ) - 256 ) ;
2013-03-18 17:23:57 +01:00
Configurator = new ItemConfigurator ( configuration . getItem ( " Configurator " , 11221 ) . getInt ( ) ) . setUnlocalizedName ( " Configurator " ) ;
2013-01-12 15:52:41 +01:00
configuration . save ( ) ;
2013-04-19 21:43:00 +02:00
//Registrations
GameRegistry . registerItem ( ElectricBow , " ElectricBow " ) ;
if ( extrasEnabled )
{
GameRegistry . registerItem ( Stopwatch , " Stopwatch " ) ;
GameRegistry . registerItem ( WeatherOrb , " WeatherOrb " ) ;
}
GameRegistry . registerItem ( Dust , " Dust " ) ;
GameRegistry . registerItem ( Ingot , " Ingot " ) ;
GameRegistry . registerItem ( EnergyTablet , " EnergyTablet " ) ;
GameRegistry . registerItem ( SpeedUpgrade , " SpeedUpgrade " ) ;
GameRegistry . registerItem ( EnergyUpgrade , " EnergyUpgrade " ) ;
2013-05-20 00:43:01 +02:00
GameRegistry . registerItem ( Robit , " Robit " ) ;
2013-04-19 21:43:00 +02:00
GameRegistry . registerItem ( AtomicDisassembler , " AtomicDisassembler " ) ;
GameRegistry . registerItem ( AtomicCore , " AtomicCore " ) ;
GameRegistry . registerItem ( EnrichedAlloy , " EnrichedAlloy " ) ;
GameRegistry . registerItem ( StorageTank , " StorageTank " ) ;
GameRegistry . registerItem ( ControlCircuit , " ControlCircuit " ) ;
GameRegistry . registerItem ( EnrichedIron , " EnrichedIron " ) ;
GameRegistry . registerItem ( CompressedCarbon , " CompressedCarbon " ) ;
GameRegistry . registerItem ( PortableTeleporter , " PortableTeleporter " ) ;
GameRegistry . registerItem ( TeleportationCore , " TeleportationCore " ) ;
GameRegistry . registerItem ( Clump , " Clump " ) ;
GameRegistry . registerItem ( DirtyDust , " DirtyDust " ) ;
GameRegistry . registerItem ( Configurator , " Configurator " ) ;
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
2013-03-18 17:23:57 +01:00
BasicBlock = new BlockBasic ( basicBlockID ) . setUnlocalizedName ( " BasicBlock " ) ;
MachineBlock = new BlockMachine ( machineBlockID ) . setUnlocalizedName ( " MachineBlock " ) ;
OreBlock = new BlockOre ( oreBlockID ) . setUnlocalizedName ( " OreBlock " ) ;
EnergyCube = new BlockEnergyCube ( energyCubeID ) . setUnlocalizedName ( " EnergyCube " ) ;
ObsidianTNT = new BlockObsidianTNT ( obsidianTNTID ) . setUnlocalizedName ( " ObsidianTNT " ) . setCreativeTab ( tabMekanism ) ;
BoundingBlock = ( BlockBounding ) new BlockBounding ( boundingBlockID ) . setUnlocalizedName ( " BoundingBlock " ) ;
GasTank = new BlockGasTank ( gasTankID ) . setUnlocalizedName ( " GasTank " ) ;
2013-03-25 17:00:45 +01:00
Transmitter = new BlockTransmitter ( transmitterID ) . setUnlocalizedName ( " Transmitter " ) ;
2012-08-15 22:41:41 +02:00
//Registrations
2012-12-30 22:34:45 +01:00
GameRegistry . registerBlock ( ObsidianTNT , " ObsidianTNT " ) ;
2013-03-11 18:49:01 +01:00
GameRegistry . registerBlock ( BoundingBlock , " BoundingBlock " ) ;
2012-12-30 22:34:45 +01:00
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.
2013-03-18 17:23:57 +01:00
Item . itemsList [ basicBlockID ] = new ItemBlockBasic ( basicBlockID - 256 , BasicBlock ) . setUnlocalizedName ( " BasicBlock " ) ;
Item . itemsList [ machineBlockID ] = new ItemBlockMachine ( machineBlockID - 256 , MachineBlock ) . setUnlocalizedName ( " MachineBlock " ) ;
Item . itemsList [ oreBlockID ] = new ItemBlockOre ( oreBlockID - 256 , OreBlock ) . setUnlocalizedName ( " OreBlock " ) ;
Item . itemsList [ energyCubeID ] = new ItemBlockEnergyCube ( energyCubeID - 256 , EnergyCube ) . setUnlocalizedName ( " EnergyCube " ) ;
2013-03-25 17:00:45 +01:00
Item . itemsList [ transmitterID ] = new ItemBlockTransmitter ( transmitterID - 256 , Transmitter ) . setUnlocalizedName ( " Transmitter " ) ;
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 ) ) ;
2013-02-27 02:21:30 +01:00
OreDictionary . registerOre ( " dustOsmium " , new ItemStack ( Dust , 1 , 2 ) ) ;
2013-02-22 04:03:54 +01:00
OreDictionary . registerOre ( " dustRefinedObsidian " , 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 ) ) ;
2013-01-12 15:52:41 +01:00
OreDictionary . registerOre ( " dustCopper " , new ItemStack ( Dust , 1 , 6 ) ) ;
OreDictionary . registerOre ( " dustTin " , new ItemStack ( Dust , 1 , 7 ) ) ;
2013-02-01 01:43:39 +01:00
OreDictionary . registerOre ( " dustSilver " , new ItemStack ( Dust , 1 , 8 ) ) ;
2012-11-07 02:44:59 +01:00
2013-01-23 21:42:45 +01:00
OreDictionary . registerOre ( " ingotRefinedObsidian " , new ItemStack ( Ingot , 1 , 0 ) ) ;
2013-02-27 02:21:30 +01:00
OreDictionary . registerOre ( " ingotOsmium " , new ItemStack ( Ingot , 1 , 1 ) ) ;
2012-12-30 22:34:45 +01:00
OreDictionary . registerOre ( " ingotBronze " , new ItemStack ( Ingot , 1 , 2 ) ) ;
2013-01-23 21:42:45 +01:00
OreDictionary . registerOre ( " ingotRefinedGlowstone " , 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
2013-02-27 02:21:30 +01:00
OreDictionary . registerOre ( " blockOsmium " , new ItemStack ( BasicBlock , 1 , 0 ) ) ;
2013-01-12 15:52:41 +01:00
OreDictionary . registerOre ( " blockBronze " , new ItemStack ( BasicBlock , 1 , 1 ) ) ;
OreDictionary . registerOre ( " blockRefinedObsidian " , new ItemStack ( BasicBlock , 1 , 2 ) ) ;
OreDictionary . registerOre ( " blockCoal " , new ItemStack ( BasicBlock , 1 , 3 ) ) ;
OreDictionary . registerOre ( " blockRefinedGlowstone " , new ItemStack ( BasicBlock , 1 , 4 ) ) ;
OreDictionary . registerOre ( " blockSteel " , new ItemStack ( BasicBlock , 1 , 5 ) ) ;
2013-02-25 21:02:05 +01:00
OreDictionary . registerOre ( " dustDirtyIron " , new ItemStack ( DirtyDust , 1 , 0 ) ) ;
OreDictionary . registerOre ( " dustDirtyGold " , new ItemStack ( DirtyDust , 1 , 1 ) ) ;
2013-02-27 02:21:30 +01:00
OreDictionary . registerOre ( " dustDirtyOsmium " , new ItemStack ( DirtyDust , 1 , 2 ) ) ;
2013-02-25 21:02:05 +01:00
OreDictionary . registerOre ( " dustDirtyCopper " , new ItemStack ( DirtyDust , 1 , 3 ) ) ;
OreDictionary . registerOre ( " dustDirtyTin " , new ItemStack ( DirtyDust , 1 , 4 ) ) ;
OreDictionary . registerOre ( " dustDirtySilver " , new ItemStack ( DirtyDust , 1 , 5 ) ) ;
OreDictionary . registerOre ( " dustDirtyObsidian " , new ItemStack ( DirtyDust , 1 , 6 ) ) ;
2013-02-22 04:03:54 +01:00
2013-04-19 21:43:00 +02:00
//for RailCraft. rc + mek = rawr
2013-02-22 04:03:54 +01:00
OreDictionary . registerOre ( " dustObsidian " , new ItemStack ( DirtyDust , 1 , 6 ) ) ;
2013-01-23 21:42:45 +01:00
OreDictionary . registerOre ( " clumpIron " , new ItemStack ( Clump , 1 , 0 ) ) ;
OreDictionary . registerOre ( " clumpGold " , new ItemStack ( Clump , 1 , 1 ) ) ;
2013-02-27 02:21:30 +01:00
OreDictionary . registerOre ( " clumpOsmium " , new ItemStack ( Clump , 1 , 2 ) ) ;
2013-01-23 21:42:45 +01:00
OreDictionary . registerOre ( " clumpCopper " , new ItemStack ( Clump , 1 , 3 ) ) ;
OreDictionary . registerOre ( " clumpTin " , new ItemStack ( Clump , 1 , 4 ) ) ;
2013-02-01 01:43:39 +01:00
OreDictionary . registerOre ( " clumpSilver " , new ItemStack ( Clump , 1 , 5 ) ) ;
2013-01-23 21:42:45 +01:00
2013-02-27 02:21:30 +01:00
OreDictionary . registerOre ( " oreOsmium " , new ItemStack ( OreBlock , 1 , 0 ) ) ;
2012-11-15 21:04:12 +01:00
2013-03-18 17:23:57 +01:00
try {
CraftingManagers . pulverizerManager . addRecipe ( 400 , new ItemStack ( OreBlock , 1 , 0 ) , new ItemStack ( Dust , 2 , 2 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 40 , new ItemStack ( Mekanism . Ingot , 1 , 1 ) , new ItemStack ( Mekanism . Dust , 1 , 2 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 40 , new ItemStack ( Mekanism . Ingot , 1 , 0 ) , new ItemStack ( Mekanism . Dust , 1 , 3 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 40 , new ItemStack ( Mekanism . Ingot , 1 , 3 ) , new ItemStack ( Item . lightStoneDust ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 40 , new ItemStack ( Mekanism . Ingot , 1 , 4 ) , new ItemStack ( Mekanism . Dust , 1 , 5 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 80 , new ItemStack ( Clump , 1 , 0 ) , new ItemStack ( DirtyDust , 1 , 0 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 80 , new ItemStack ( Clump , 1 , 1 ) , new ItemStack ( DirtyDust , 1 , 1 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 80 , new ItemStack ( Clump , 1 , 2 ) , new ItemStack ( DirtyDust , 1 , 2 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 80 , new ItemStack ( Clump , 1 , 3 ) , new ItemStack ( DirtyDust , 1 , 3 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 80 , new ItemStack ( Clump , 1 , 4 ) , new ItemStack ( DirtyDust , 1 , 4 ) , false ) ;
CraftingManagers . pulverizerManager . addRecipe ( 80 , new ItemStack ( Clump , 1 , 5 ) , new ItemStack ( DirtyDust , 1 , 5 ) , false ) ;
System . out . println ( " [Mekanism] Hooked into Thermal Expansion successfully. " ) ;
} catch ( Exception e ) { }
2013-02-14 19:26:13 +01:00
if ( controlCircuitOreDict )
{
OreDictionary . registerOre ( " basicCircuit " , new ItemStack ( ControlCircuit ) ) ;
}
2013-02-25 21:02:05 +01:00
OreDictionary . registerOre ( " itemCompressedCarbon " , new ItemStack ( CompressedCarbon ) ) ;
OreDictionary . registerOre ( " itemEnrichedAlloy " , new ItemStack ( EnrichedAlloy ) ) ;
2013-01-21 02:15:59 +01:00
2012-11-03 03:27:30 +01:00
if ( hooks . IC2Loaded )
{
2012-11-07 02:44:59 +01:00
if ( ! hooks . RailcraftLoaded )
{
2013-04-19 21:43:00 +02:00
Recipes . macerator . addRecipe ( new ItemStack ( Block . obsidian ) , new ItemStack ( DirtyDust , 1 , 6 ) ) ;
2012-11-07 02:44:59 +01:00
}
2013-01-12 15:52:41 +01:00
}
2013-02-22 04:03:54 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustRefinedObsidian " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addOsmiumCompressorRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Ingot , 1 , 0 ) ) ;
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( DirtyDust , 1 , 6 ) ) ;
2013-02-22 04:03:54 +01:00
}
2013-01-23 21:42:45 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " clumpIron " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( DirtyDust , 1 , 0 ) ) ;
2013-01-23 21:42:45 +01:00
}
for ( ItemStack ore : OreDictionary . getOres ( " clumpGold " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( DirtyDust , 1 , 1 ) ) ;
2013-01-23 21:42:45 +01:00
}
2013-02-27 02:21:30 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " clumpOsmium " ) )
2013-01-23 21:42:45 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( DirtyDust , 1 , 2 ) ) ;
2013-01-23 21:42:45 +01:00
}
for ( ItemStack ore : OreDictionary . getOres ( " clumpCopper " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( DirtyDust , 1 , 3 ) ) ;
2013-01-23 21:42:45 +01:00
}
for ( ItemStack ore : OreDictionary . getOres ( " clumpTin " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( DirtyDust , 1 , 4 ) ) ;
2013-01-23 21:42:45 +01:00
}
2013-02-01 01:43:39 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " clumpSilver " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( DirtyDust , 1 , 5 ) ) ;
2013-02-01 01:43:39 +01:00
}
2013-02-25 21:02:05 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustDirtyIron " ) )
2013-01-23 21:42:45 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 0 ) ) ;
2013-01-23 21:42:45 +01:00
}
2013-02-25 21:02:05 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustDirtyGold " ) )
2013-01-23 21:42:45 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 1 ) ) ;
2013-01-23 21:42:45 +01:00
}
2013-02-27 02:21:30 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustDirtyOsmium " ) )
2013-01-23 21:42:45 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 2 ) ) ;
2013-01-23 21:42:45 +01:00
}
2013-02-25 21:02:05 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustDirtyCopper " ) )
2013-01-23 21:42:45 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 6 ) ) ;
2013-01-23 21:42:45 +01:00
}
2013-02-25 21:02:05 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustDirtyTin " ) )
2013-01-23 21:42:45 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 7 ) ) ;
2013-01-23 21:42:45 +01:00
}
2013-02-25 21:02:05 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustDirtySilver " ) )
2013-02-01 01:43:39 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 8 ) ) ;
2013-02-01 01:43:39 +01:00
}
2013-01-12 15:52:41 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " oreCopper " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 2 , 6 ) ) ;
RecipeHandler . addPurificationChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Clump , 3 , 3 ) ) ;
2013-01-12 15:52:41 +01:00
}
for ( ItemStack ore : OreDictionary . getOres ( " oreTin " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 2 , 7 ) ) ;
RecipeHandler . addPurificationChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Clump , 3 , 4 ) ) ;
2012-12-03 16:10:48 +01:00
}
2013-02-27 02:21:30 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " oreOsmium " ) )
2012-12-03 16:10:48 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 2 , 2 ) ) ;
RecipeHandler . addPurificationChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Clump , 3 , 2 ) ) ;
2012-12-03 16:10:48 +01:00
}
2013-05-20 19:51:18 +02:00
for ( ItemStack ore : OreDictionary . getOres ( " oreIron " ) )
{
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreIron ) , new ItemStack ( Dust , 2 , 0 ) ) ;
RecipeHandler . addPurificationChamberRecipe ( new ItemStack ( Block . oreIron ) , new ItemStack ( Clump , 3 , 0 ) ) ;
}
for ( ItemStack ore : OreDictionary . getOres ( " oreGold " ) )
{
RecipeHandler . addEnrichmentChamberRecipe ( new ItemStack ( Block . oreGold ) , new ItemStack ( Dust , 2 , 1 ) ) ;
RecipeHandler . addPurificationChamberRecipe ( new ItemStack ( Block . oreGold ) , new ItemStack ( Clump , 3 , 1 ) ) ;
}
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " oreLead " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , MekanismUtils . size ( OreDictionary . getOres ( " dustLead " ) . get ( 0 ) , 2 ) ) ;
2012-12-03 16:10:48 +01:00
}
for ( ItemStack ore : OreDictionary . getOres ( " ingotLead " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , MekanismUtils . size ( OreDictionary . getOres ( " dustLead " ) . get ( 0 ) , 1 ) ) ;
2012-12-03 16:10:48 +01:00
}
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 " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 2 , 8 ) ) ;
RecipeHandler . addPurificationChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Clump , 3 , 5 ) ) ;
2012-12-03 16:10:48 +01:00
}
for ( ItemStack ore : OreDictionary . getOres ( " ingotSilver " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 8 ) ) ;
2012-12-03 16:10:48 +01:00
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
2013-01-23 21:42:45 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " ingotRefinedObsidian " ) )
2012-12-03 16:10:48 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 3 ) ) ;
2012-12-03 16:10:48 +01:00
}
2013-02-27 02:21:30 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " ingotOsmium " ) )
2012-12-03 16:10:48 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 2 ) ) ;
2012-12-03 16:10:48 +01:00
}
for ( ItemStack ore : OreDictionary . getOres ( " ingotRedstone " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Item . redstone ) ) ;
2012-12-03 16:10:48 +01:00
}
2013-01-23 21:42:45 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " ingotRefinedGlowstone " ) )
2012-12-03 16:10:48 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Item . lightStoneDust ) ) ;
2012-12-03 16:10:48 +01:00
}
2013-01-21 02:15:59 +01:00
try {
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( new ItemStack ( Ingot , 1 , 2 ) , MekanismUtils . size ( OreDictionary . getOres ( " dustBronze " ) . get ( 0 ) , 1 ) ) ;
2013-03-18 17:23:57 +01:00
if ( hooks . IC2Loaded )
{
2013-06-07 17:33:12 +02:00
Recipes . macerator . addRecipe ( new ItemStack ( Ingot , 1 , 2 ) , MekanismUtils . size ( OreDictionary . getOres ( " dustBronze " ) . get ( 0 ) , 1 ) ) ;
2013-03-18 17:23:57 +01:00
}
if ( hooks . TELoaded )
{
2013-06-07 17:33:12 +02:00
CraftingManagers . pulverizerManager . addRecipe ( 40 , new ItemStack ( Ingot , 1 , 2 ) , MekanismUtils . size ( OreDictionary . getOres ( " dustBronze " ) . get ( 0 ) , 1 ) , false ) ;
2013-03-18 17:23:57 +01:00
}
} catch ( Exception e ) { }
try {
2013-06-07 17:33:12 +02:00
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . itemID , 6 , MekanismUtils . size ( OreDictionary . getOres ( " ingotCopper " ) . get ( 0 ) , 1 ) , 1 . 0F ) ;
2013-01-21 02:15:59 +01:00
} catch ( Exception e ) { }
try {
2013-06-07 17:33:12 +02:00
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . itemID , 7 , MekanismUtils . size ( OreDictionary . getOres ( " ingotTin " ) . get ( 0 ) , 1 ) , 1 . 0F ) ;
2013-01-21 02:15:59 +01:00
} catch ( Exception e ) { }
2013-02-14 19:26:13 +01:00
try {
2013-06-07 17:33:12 +02:00
FurnaceRecipes . smelting ( ) . addSmelting ( Dust . itemID , 8 , MekanismUtils . size ( OreDictionary . getOres ( " ingotSilver " ) . get ( 0 ) , 1 ) , 1 . 0F ) ;
2013-02-14 19:26:13 +01:00
} catch ( Exception e ) { }
2013-04-06 19:28:59 +02:00
try {
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( new ItemStack ( Item . coal ) , MekanismUtils . size ( OreDictionary . getOres ( " dustCoal " ) . get ( 0 ) , 1 ) ) ;
2013-04-06 19:28:59 +02:00
} catch ( Exception e ) { }
try {
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( new ItemStack ( Item . coal , 1 , 1 ) , MekanismUtils . size ( OreDictionary . getOres ( " dustCharcoal " ) . get ( 0 ) , 1 ) ) ;
2013-04-06 19:28:59 +02:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " ingotCopper " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 6 ) ) ;
2012-12-03 16:10:48 +01:00
}
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 " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 7 ) ) ;
2012-12-03 16:10:48 +01:00
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
2013-02-14 19:26:13 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " ingotSilver " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 8 ) ) ;
2013-02-14 19:26:13 +01:00
}
} catch ( Exception e ) { }
2012-12-03 16:10:48 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustIron " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( ore , 8 ) , new ItemStack ( Block . oreIron ) ) ;
2012-12-03 16:10:48 +01:00
}
2013-03-20 16:14:26 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " ingotSteel " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Dust , 1 , 5 ) ) ;
2013-03-20 16:14:26 +01:00
}
2012-12-03 16:10:48 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustGold " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( ore , 8 ) , new ItemStack ( Block . oreGold ) ) ;
2012-12-03 16:10:48 +01:00
}
for ( ItemStack ore : OreDictionary . getOres ( " dustObsidian " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Block . obsidian ) ) ;
RecipeHandler . addMetallurgicInfuserRecipe ( InfusionInput . getInfusion ( InfuseRegistry . get ( " DIAMOND " ) , 10 , MekanismUtils . size ( ore , 1 ) ) , new ItemStack ( Dust , 1 , 3 ) ) ;
2012-11-03 03:27:30 +01:00
}
2013-02-27 02:21:30 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustOsmium " ) )
2012-11-03 03:27:30 +01:00
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( ore , 8 ) , new ItemStack ( OreBlock , 1 , 0 ) ) ;
2012-11-03 03:27:30 +01:00
}
2012-12-03 16:10:48 +01:00
2013-02-22 04:03:54 +01:00
for ( ItemStack ore : OreDictionary . getOres ( " dustDiamond " ) )
{
2013-06-02 03:33:19 +02:00
InfuseRegistry . registerInfuseObject ( ore , new InfuseObject ( InfuseRegistry . get ( " DIAMOND " ) , 80 ) ) ;
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , new ItemStack ( Item . diamond ) ) ;
2013-02-22 04:03:54 +01:00
}
2012-12-03 16:10:48 +01:00
try {
for ( ItemStack ore : OreDictionary . getOres ( " dustCopper " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( ore , 8 ) , MekanismUtils . size ( OreDictionary . getOres ( " oreCopper " ) . get ( 0 ) , 1 ) ) ;
2012-12-03 16:10:48 +01:00
}
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-06-07 17:33:12 +02:00
RecipeHandler . addMetallurgicInfuserRecipe ( InfusionInput . getInfusion ( InfuseRegistry . get ( " TIN " ) , 10 , MekanismUtils . size ( ore , 1 ) ) , 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 " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( ore , 8 ) , MekanismUtils . size ( OreDictionary . getOres ( " oreTin " ) . get ( 0 ) , 1 ) ) ;
2013-06-02 03:33:19 +02:00
InfuseRegistry . registerInfuseObject ( ore , new InfuseObject ( InfuseRegistry . get ( " TIN " ) , 50 ) ) ;
2012-12-03 16:10:48 +01:00
}
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 " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( ore , 8 ) , MekanismUtils . size ( OreDictionary . getOres ( " oreLead " ) . get ( 0 ) , 1 ) ) ;
2012-12-03 16:10:48 +01:00
}
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 " ) )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( ore , 8 ) , MekanismUtils . size ( OreDictionary . getOres ( " oreSilver " ) . get ( 0 ) , 1 ) ) ;
2012-12-03 16:10:48 +01:00
}
2012-12-09 06:24:27 +01:00
} catch ( Exception e ) { }
2013-06-02 05:20:15 +02:00
if ( hooks . MetallurgyCoreLoaded )
{
try {
2013-04-28 22:38:46 +02:00
String [ ] setNames = { " base " , " precious " , " nether " , " fantasy " , " ender " , " utility " } ;
2013-06-02 05:20:15 +02:00
for ( String setName : setNames )
{
for ( IOreInfo oreInfo : MetallurgyAPI . getMetalSet ( setName ) . getOreList ( ) . values ( ) )
{
switch ( oreInfo . getType ( ) )
2013-06-07 17:16:47 +02:00
{
2013-06-02 05:20:15 +02:00
case ALLOY :
{
if ( oreInfo . getIngot ( ) ! = null & & oreInfo . getDust ( ) ! = null )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( oreInfo . getIngot ( ) , 1 ) , MekanismUtils . size ( oreInfo . getDust ( ) , 1 ) ) ;
2013-04-28 22:38:46 +02:00
}
2013-06-02 05:20:15 +02:00
2013-04-28 22:38:46 +02:00
break ;
}
2013-06-02 05:20:15 +02:00
case DROP :
{
2013-04-28 22:38:46 +02:00
ItemStack ore = oreInfo . getOre ( ) ;
ItemStack drop = oreInfo . getDrop ( ) ;
2013-06-02 05:20:15 +02:00
if ( drop ! = null & & ore ! = null )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , MekanismUtils . size ( drop , 12 ) ) ;
2013-04-28 22:38:46 +02:00
}
2013-06-02 05:20:15 +02:00
2013-04-28 22:38:46 +02:00
break ;
}
2013-06-02 05:20:15 +02:00
default :
{
2013-04-28 22:38:46 +02:00
ItemStack ore = oreInfo . getOre ( ) ;
ItemStack dust = oreInfo . getDust ( ) ;
ItemStack ingot = oreInfo . getIngot ( ) ;
2013-06-02 05:20:15 +02:00
if ( ore ! = null & & dust ! = null )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addEnrichmentChamberRecipe ( MekanismUtils . size ( ore , 1 ) , MekanismUtils . size ( dust , 2 ) ) ;
RecipeHandler . addCombinerRecipe ( MekanismUtils . size ( dust , 8 ) , MekanismUtils . size ( ore , 1 ) ) ;
2013-04-28 22:38:46 +02:00
}
2013-06-02 05:20:15 +02:00
if ( ingot ! = null & & dust ! = null )
{
2013-06-07 17:33:12 +02:00
RecipeHandler . addCrusherRecipe ( MekanismUtils . size ( ingot , 1 ) , MekanismUtils . size ( dust , 1 ) ) ;
2013-04-28 22:38:46 +02:00
}
2013-06-02 05:20:15 +02:00
2013-04-28 22:38:46 +02:00
break ;
}
}
}
}
2013-06-02 05:20:15 +02:00
} catch ( Exception e ) { }
2013-04-28 22:38:46 +02:00
}
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 ( ) ) ;
2013-05-20 00:43:01 +02:00
EntityRegistry . registerGlobalEntityID ( EntityRobit . class , " Robit " , EntityRegistry . findGlobalUniqueEntityId ( ) ) ;
2012-08-15 22:41:41 +02:00
//Registrations
2013-05-20 00:43:01 +02:00
EntityRegistry . registerModEntity ( EntityObsidianTNT . class , " ObsidianTNT " , 0 , this , 40 , 5 , true ) ;
EntityRegistry . registerModEntity ( EntityRobit . class , " Robit " , 1 , this , 40 , 5 , true ) ;
2012-08-15 22:41:41 +02:00
//Tile entities
2012-11-28 16:33:34 +01:00
GameRegistry . registerTileEntity ( TileEntityEnergyCube . class , " EnergyCube " ) ;
2013-03-11 18:49:01 +01:00
GameRegistry . registerTileEntity ( TileEntityBoundingBlock . class , " BoundingBlock " ) ;
2012-11-21 16:14:35 +01:00
GameRegistry . registerTileEntity ( TileEntityControlPanel . class , " ControlPanel " ) ;
GameRegistry . registerTileEntity ( TileEntityGasTank . class , " GasTank " ) ;
2013-01-21 02:15:59 +01:00
GameRegistry . registerTileEntity ( TileEntityTeleporter . class , " MekanismTeleporter " ) ;
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
}
2013-02-14 19:26:13 +01:00
@ServerStarting
public void serverStarting ( FMLServerStartingEvent event )
2012-10-03 21:12:17 +02:00
{
2013-02-14 19:26:13 +01:00
event . registerServerCommand ( new CommandMekanism ( ) ) ;
2012-10-03 21:12:17 +02:00
}
2012-12-30 22:34:45 +01:00
@ServerStopping
public void serverStopping ( FMLServerStoppingEvent event )
{
2013-01-21 02:15:59 +01:00
teleporters . clear ( ) ;
2013-04-28 21:23:08 +02:00
dynamicInventories . clear ( ) ;
inventoryLocations . clear ( ) ;
2012-12-30 22:34:45 +01:00
}
2012-10-18 16:26:34 +02:00
@PreInit
public void preInit ( FMLPreInitializationEvent event )
{
2013-03-18 17:23:57 +01:00
File config = event . getSuggestedConfigurationFile ( ) ;
2013-05-20 00:43:01 +02:00
2012-10-18 16:26:34 +02:00
//Set the mod's configuration
2013-03-18 17:23:57 +01:00
configuration = new Configuration ( config ) ;
if ( config . getAbsolutePath ( ) . contains ( " voltz " ) )
{
System . out . println ( " [Mekanism] Detected Voltz in root directory - hello, fellow user! " ) ;
}
2013-05-20 00:43:01 +02:00
else if ( config . getAbsolutePath ( ) . contains ( " tekkit " ) )
{
System . out . println ( " [Mekanism] Detected Tekkit in root directory - hello, fellow user! " ) ;
}
2013-06-02 03:33:19 +02:00
//Register infuses
InfuseRegistry . registerInfuseType ( new InfuseType ( " CARBON " , " /mods/mekanism/infuse/Infusions.png " , 0 , 0 ) ) ;
InfuseRegistry . registerInfuseType ( new InfuseType ( " TIN " , " /mods/mekanism/infuse/Infusions.png " , 4 , 0 ) ) ;
InfuseRegistry . registerInfuseType ( new InfuseType ( " DIAMOND " , " /mods/mekanism/infuse/Infusions.png " , 8 , 0 ) ) ;
2012-10-18 16:26:34 +02:00
}
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 ( ) ;
2013-05-01 03:30:43 +02:00
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
2013-01-21 02:15:59 +01:00
//Initialization notification
2012-11-05 20:29:04 +01:00
System . out . println ( " [Mekanism] Version " + versionNumber + " initializing... " ) ;
2012-12-09 06:24:27 +01:00
2013-01-21 02:15:59 +01:00
//Get data from server.
2012-09-08 18:48:24 +02:00
new ThreadGetData ( ) ;
2012-12-09 06:24:27 +01:00
2013-03-25 17:00:45 +01:00
//Register to receive subscribed events
2012-11-09 03:22:18 +01:00
MinecraftForge . EVENT_BUS . register ( this ) ;
2013-03-25 17:00:45 +01:00
MinecraftForge . EVENT_BUS . register ( new IC2EnergyHandler ( ) ) ;
2013-05-23 19:30:12 +02:00
//Load configuration
proxy . loadConfiguration ( ) ;
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 ( ) ;
addRecipes ( ) ;
addEntities ( ) ;
2012-11-28 16:33:34 +01:00
2013-06-13 23:37:30 +02:00
//Packet registrations
PacketHandler . registerPacket ( PacketRobit . class ) ;
PacketHandler . registerPacket ( PacketTransmitterTransferUpdate . class ) ;
PacketHandler . registerPacket ( PacketTime . class ) ;
PacketHandler . registerPacket ( PacketWeather . class ) ;
PacketHandler . registerPacket ( PacketElectricChest . class ) ;
PacketHandler . registerPacket ( PacketElectricBowState . class ) ;
PacketHandler . registerPacket ( PacketConfiguratorState . class ) ;
PacketHandler . registerPacket ( PacketControlPanel . class ) ;
PacketHandler . registerPacket ( PacketTileEntity . class ) ;
PacketHandler . registerPacket ( PacketPortalFX . class ) ;
PacketHandler . registerPacket ( PacketDataRequest . class ) ;
PacketHandler . registerPacket ( PacketStatusUpdate . class ) ;
PacketHandler . registerPacket ( PacketDigitUpdate . class ) ;
PacketHandler . registerPacket ( PacketPortableTeleport . class ) ;
2013-05-20 00:43:01 +02:00
//Load proxy
proxy . registerRenderInformation ( ) ;
proxy . loadUtilities ( ) ;
2013-01-21 02:15:59 +01:00
//Completion notification
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
}
2013-04-23 21:36:43 +02:00
@ForgeSubscribe
public void onGasTransferred ( GasTransferEvent event )
{
2013-06-15 00:25:09 +02:00
PacketHandler . sendPacket ( Transmission . ALL_CLIENTS , new PacketTransmitterTransferUpdate ( ) . setParams ( TransmitterTransferType . GAS , event . transferProtocol . pointer , event . transferProtocol . transferType ) ) ;
2013-04-23 21:36:43 +02:00
}
2013-04-28 21:23:08 +02:00
@ForgeSubscribe
public void onLiquidTransferred ( LiquidTransferEvent event )
{
2013-06-15 00:25:09 +02:00
PacketHandler . sendPacket ( Transmission . ALL_CLIENTS , new PacketTransmitterTransferUpdate ( ) . setParams ( TransmitterTransferType . LIQUID , event . transferProtocol . pointer , event . liquidSent ) ) ;
2013-04-28 21:23:08 +02:00
}
@ForgeSubscribe
public void onEnergyTransferred ( EnergyTransferEvent event )
{
2013-06-15 00:25:09 +02:00
PacketHandler . sendPacket ( Transmission . ALL_CLIENTS , new PacketTransmitterTransferUpdate ( ) . setParams ( TransmitterTransferType . ENERGY , event . transferProtocol . pointer ) ) ;
2013-04-28 21:23:08 +02:00
}
2012-08-15 22:41:41 +02:00
}