2012-05-09 22:43:05 +02:00
/ * *
2017-11-10 19:30:16 +01:00
* Copyright ( c ) 2011 - 2017 , SpaceToad and the BuildCraft Team
2014-02-01 17:19:07 +01:00
* http : //www.mod-buildcraft.com
2015-09-20 11:20:30 +02:00
* < p / >
2014-02-01 17:19:07 +01:00
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1 . 0 , or MMPL . Please check the contents of the license located in
* http : //www.mod-buildcraft.com/MMPL-1.0.txt
2012-05-09 22:43:05 +02:00
* /
2012-07-25 12:45:15 +02:00
package buildcraft ;
2015-03-04 22:44:44 +01:00
import net.minecraft.block.Block ;
2015-07-23 18:41:11 +02:00
import net.minecraft.block.BlockDispenser ;
2014-05-01 16:42:58 +02:00
import net.minecraft.init.Blocks ;
import net.minecraft.init.Items ;
2014-05-26 09:34:28 +02:00
import net.minecraft.item.Item ;
2014-05-01 16:42:58 +02:00
import net.minecraft.item.ItemStack ;
2015-03-03 21:47:33 +01:00
import net.minecraft.stats.Achievement ;
2015-09-20 11:20:30 +02:00
2015-09-04 11:46:06 +02:00
import cpw.mods.fml.common.Loader ;
2014-05-03 18:59:52 +02:00
import cpw.mods.fml.common.Mod ;
2015-09-04 11:46:06 +02:00
import cpw.mods.fml.common.Optional ;
2014-05-03 18:59:52 +02:00
import cpw.mods.fml.common.event.FMLInitializationEvent ;
import cpw.mods.fml.common.event.FMLInterModComms ;
2014-10-19 10:18:23 +02:00
import cpw.mods.fml.common.event.FMLMissingMappingsEvent ;
2014-05-03 18:59:52 +02:00
import cpw.mods.fml.common.event.FMLPreInitializationEvent ;
import cpw.mods.fml.common.network.NetworkRegistry ;
2015-04-23 11:47:04 +02:00
import cpw.mods.fml.common.registry.EntityRegistry ;
2014-10-20 12:38:26 +02:00
import cpw.mods.fml.common.registry.GameRegistry ;
2014-05-26 09:34:28 +02:00
import net.minecraftforge.oredict.OreDictionary ;
2015-05-07 19:49:53 +02:00
2014-10-26 12:27:51 +01:00
import buildcraft.api.blueprints.BuilderAPI ;
2014-06-02 16:29:13 +02:00
import buildcraft.api.recipes.BuildcraftRecipeRegistry ;
2015-09-29 09:54:12 +02:00
import buildcraft.core.BCRegistry ;
2015-03-04 15:49:21 +01:00
import buildcraft.core.CompatHooks ;
2012-07-25 12:45:15 +02:00
import buildcraft.core.DefaultProps ;
2013-09-12 15:27:11 +02:00
import buildcraft.core.InterModComms ;
2012-09-08 21:46:17 +02:00
import buildcraft.core.Version ;
2015-04-01 08:13:06 +02:00
import buildcraft.core.builders.schematics.SchematicRotateMeta ;
2015-04-02 14:46:57 +02:00
import buildcraft.core.config.ConfigManager ;
2015-03-31 23:21:00 +02:00
import buildcraft.core.lib.items.ItemBuildCraft ;
2015-03-06 16:45:05 +01:00
import buildcraft.core.lib.network.ChannelHandler ;
2015-04-23 11:47:04 +02:00
import buildcraft.core.network.EntityIds ;
2015-02-04 04:03:17 +01:00
import buildcraft.silicon.BlockLaser ;
import buildcraft.silicon.BlockLaserTable ;
2015-04-20 17:06:33 +02:00
import buildcraft.silicon.BlockPackager ;
2015-04-23 11:47:04 +02:00
import buildcraft.silicon.EntityPackage ;
2015-02-04 04:03:17 +01:00
import buildcraft.silicon.ItemLaserTable ;
2015-04-20 17:06:33 +02:00
import buildcraft.silicon.ItemPackage ;
2015-02-04 04:03:17 +01:00
import buildcraft.silicon.ItemRedstoneChipset ;
import buildcraft.silicon.ItemRedstoneChipset.Chipset ;
2015-03-31 23:21:00 +02:00
import buildcraft.silicon.SiliconGuiHandler ;
2015-02-04 04:03:17 +01:00
import buildcraft.silicon.SiliconProxy ;
import buildcraft.silicon.TileAdvancedCraftingTable ;
import buildcraft.silicon.TileAssemblyTable ;
import buildcraft.silicon.TileChargingTable ;
import buildcraft.silicon.TileIntegrationTable ;
import buildcraft.silicon.TileLaser ;
2015-04-20 17:06:33 +02:00
import buildcraft.silicon.TilePackager ;
2015-02-24 14:39:23 +01:00
import buildcraft.silicon.TileProgrammingTable ;
2015-04-20 17:06:33 +02:00
import buildcraft.silicon.TileStampingTable ;
2015-02-04 04:03:17 +01:00
import buildcraft.silicon.network.PacketHandlerSilicon ;
2015-07-23 18:41:11 +02:00
import buildcraft.transport.stripes.StripesHandlerDispenser ;
2014-01-13 20:26:16 +01:00
2015-03-04 16:41:22 +01:00
@Mod ( name = " BuildCraft Silicon " , version = Version . VERSION , useMetadata = false , modid = " BuildCraft|Silicon " , dependencies = DefaultProps . DEPENDENCY_CORE )
2014-01-13 20:26:16 +01:00
public class BuildCraftSilicon extends BuildCraftMod {
2014-07-27 23:05:35 +02:00
@Mod.Instance ( " BuildCraft|Silicon " )
public static BuildCraftSilicon instance ;
2013-10-26 12:14:23 +02:00
public static ItemRedstoneChipset redstoneChipset ;
2015-04-20 17:06:33 +02:00
public static ItemPackage packageItem ;
2012-05-09 22:43:05 +02:00
public static BlockLaser laserBlock ;
2013-05-27 23:19:51 +02:00
public static BlockLaserTable assemblyTableBlock ;
2015-04-20 17:06:33 +02:00
public static BlockPackager packagerBlock ;
2014-05-26 09:34:28 +02:00
public static Item redstoneCrystal ;
2014-06-27 23:42:30 +02:00
2015-03-03 21:47:33 +01:00
public static Achievement timeForSomeLogicAchievement ;
public static Achievement tinglyLaserAchievement ;
2014-12-29 22:17:40 +01:00
public static float chipsetCostMultiplier = 1 . 0F ;
2014-04-14 18:27:59 +02:00
@Mod.EventHandler
2014-03-01 17:35:32 +01:00
public void preInit ( FMLPreInitializationEvent evt ) {
2015-04-02 14:46:57 +02:00
BuildCraftCore . mainConfigManager . register ( " power.chipsetCostMultiplier " , 1 . 0D , " The cost multiplier for Chipsets " , ConfigManager . RestartRequirement . GAME ) ;
2015-03-04 15:49:21 +01:00
BuildCraftCore . mainConfiguration . save ( ) ;
2015-04-02 14:46:57 +02:00
chipsetCostMultiplier = ( float ) BuildCraftCore . mainConfigManager . get ( " power.chipsetCostMultiplier " ) . getDouble ( ) ;
if ( BuildCraftCore . mainConfiguration . hasChanged ( ) ) {
BuildCraftCore . mainConfiguration . save ( ) ;
}
2012-05-09 22:43:05 +02:00
2015-01-17 21:13:58 +01:00
laserBlock = ( BlockLaser ) CompatHooks . INSTANCE . getBlock ( BlockLaser . class ) ;
2014-02-21 06:45:36 +01:00
laserBlock . setBlockName ( " laserBlock " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerBlock ( laserBlock , false ) ;
2012-05-09 22:43:05 +02:00
2015-01-17 21:13:58 +01:00
assemblyTableBlock = ( BlockLaserTable ) CompatHooks . INSTANCE . getBlock ( BlockLaserTable . class ) ;
2014-10-19 10:24:27 +02:00
assemblyTableBlock . setBlockName ( " laserTableBlock " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerBlock ( assemblyTableBlock , ItemLaserTable . class , false ) ;
2012-10-14 03:40:55 +02:00
2015-04-20 17:06:33 +02:00
packagerBlock = ( BlockPackager ) CompatHooks . INSTANCE . getBlock ( BlockPackager . class ) ;
packagerBlock . setBlockName ( " packagerBlock " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerBlock ( packagerBlock , false ) ;
2015-04-20 17:06:33 +02:00
2014-02-08 14:47:31 +01:00
redstoneChipset = new ItemRedstoneChipset ( ) ;
2013-03-07 00:22:17 +01:00
redstoneChipset . setUnlocalizedName ( " redstoneChipset " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerItem ( redstoneChipset , false ) ;
2013-10-26 12:14:23 +02:00
redstoneChipset . registerItemStacks ( ) ;
2014-05-26 09:34:28 +02:00
2015-04-20 17:06:33 +02:00
packageItem = new ItemPackage ( ) ;
packageItem . setUnlocalizedName ( " package " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerItem ( packageItem , false ) ;
2015-04-20 17:06:33 +02:00
2014-05-26 09:34:28 +02:00
redstoneCrystal = ( new ItemBuildCraft ( ) ) . setUnlocalizedName ( " redstoneCrystal " ) ;
2015-09-29 09:54:12 +02:00
if ( BCRegistry . INSTANCE . registerItem ( redstoneCrystal , false ) ) {
OreDictionary . registerOre ( " redstoneCrystal " , new ItemStack ( redstoneCrystal ) ) ; // Deprecated
OreDictionary . registerOre ( " crystalRedstone " , new ItemStack ( redstoneCrystal ) ) ;
}
2015-06-05 09:03:47 +02:00
2015-04-23 11:47:04 +02:00
EntityRegistry . registerModEntity ( EntityPackage . class , " bcPackageThrowable " , EntityIds . PACKAGE_THROWABLE , instance , 48 , 10 , true ) ;
2012-08-24 19:25:54 +02:00
}
2014-04-14 18:27:59 +02:00
@Mod.EventHandler
2013-07-24 10:23:23 +02:00
public void init ( FMLInitializationEvent evt ) {
2014-08-15 10:55:28 +02:00
channels = NetworkRegistry . INSTANCE
. newChannel
2015-09-20 11:20:30 +02:00
( DefaultProps . NET_CHANNEL_NAME + " -SILICON " , new ChannelHandler ( ) , new PacketHandlerSilicon ( ) ) ;
2014-03-01 17:35:32 +01:00
2015-03-04 22:44:44 +01:00
NetworkRegistry . INSTANCE . registerGuiHandler ( instance , new SiliconGuiHandler ( ) ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerTileEntity ( TileLaser . class , " net.minecraft.src.buildcraft.factory.TileLaser " ) ;
BCRegistry . INSTANCE . registerTileEntity ( TileAssemblyTable . class ,
2014-08-15 10:55:28 +02:00
" net.minecraft.src.buildcraft.factory.TileAssemblyTable " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerTileEntity ( TileAdvancedCraftingTable . class ,
2014-08-15 10:55:28 +02:00
" net.minecraft.src.buildcraft.factory.TileAssemblyAdvancedWorkbench " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerTileEntity ( TileIntegrationTable . class ,
2014-08-15 10:55:28 +02:00
" net.minecraft.src.buildcraft.factory.TileIntegrationTable " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerTileEntity ( TileChargingTable . class ,
2015-09-04 11:46:06 +02:00
" net.minecraft.src.buildcraft.factory.TileChargingTable " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerTileEntity ( TileProgrammingTable . class ,
2015-02-24 14:39:23 +01:00
" net.minecraft.src.buildcraft.factory.TileProgrammingTable " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . registerTileEntity ( TilePackager . class , " buildcraft.TilePackager " ) ;
BCRegistry . INSTANCE . registerTileEntity ( TileStampingTable . class , " buildcraft.TileStampingTable " ) ;
2013-07-24 10:23:23 +02:00
2015-06-14 09:12:47 +02:00
BuilderAPI . schematicRegistry . registerSchematicBlock ( laserBlock , SchematicRotateMeta . class , new int [ ] { 2 , 5 , 3 , 4 } , true ) ;
2013-07-24 10:23:23 +02:00
2015-03-03 21:47:33 +01:00
timeForSomeLogicAchievement = BuildCraftCore . achievementManager . registerAchievement ( new Achievement ( " achievement.timeForSomeLogic " , " timeForSomeLogicAchievement " , 9 , - 2 , assemblyTableBlock , BuildCraftCore . diamondGearAchievement ) ) ;
tinglyLaserAchievement = BuildCraftCore . achievementManager . registerAchievement ( new Achievement ( " achievement.tinglyLaser " , " tinglyLaserAchievement " , 11 , - 2 , laserBlock , timeForSomeLogicAchievement ) ) ;
2013-07-24 10:23:23 +02:00
if ( BuildCraftCore . loadDefaultRecipes ) {
loadRecipes ( ) ;
}
2015-07-23 18:41:11 +02:00
BlockDispenser . dispenseBehaviorRegistry . putObject ( packageItem , new ItemPackage . DispenseBehaviour ( ) ) ;
2015-09-04 11:46:06 +02:00
if ( Loader . isModLoaded ( " BuildCraft|Transport " ) ) {
initTransport ( ) ;
}
2015-07-23 18:41:11 +02:00
2013-07-24 10:23:23 +02:00
SiliconProxy . proxy . registerRenderers ( ) ;
}
2015-09-04 11:46:06 +02:00
@Optional.Method ( modid = " BuildCraft|Transport " )
private void initTransport ( ) {
StripesHandlerDispenser . items . add ( packageItem ) ;
}
2012-08-24 19:25:54 +02:00
public static void loadRecipes ( ) {
2014-01-02 13:58:08 +01:00
// TABLES
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( laserBlock ) ,
2014-01-02 13:58:08 +01:00
" ORR " ,
" DDR " ,
" ORR " ,
2014-02-08 14:47:31 +01:00
'O' , Blocks . obsidian ,
2014-11-11 23:14:16 +01:00
'R' , " dustRedstone " ,
'D' , " gemDiamond " ) ;
2014-01-02 13:58:08 +01:00
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( laserBlock ) ,
2015-04-20 17:06:33 +02:00
" RRO " ,
" RDD " ,
" RRO " ,
'O' , Blocks . obsidian ,
'R' , " dustRedstone " ,
'D' , " gemDiamond " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( laserBlock ) ,
2015-04-20 17:06:33 +02:00
" RRR " ,
" RDR " ,
" ODO " ,
'O' , Blocks . obsidian ,
'R' , " dustRedstone " ,
'D' , " gemDiamond " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( laserBlock ) ,
2015-04-20 17:06:33 +02:00
" ODO " ,
" RDR " ,
" RRR " ,
'O' , Blocks . obsidian ,
'R' , " dustRedstone " ,
'D' , " gemDiamond " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( assemblyTableBlock , 1 , 0 ) ,
2014-01-02 13:58:08 +01:00
" ODO " ,
2015-04-20 17:06:33 +02:00
" ORO " ,
2014-01-02 13:58:08 +01:00
" OGO " ,
2014-02-08 14:47:31 +01:00
'O' , Blocks . obsidian ,
2014-11-11 23:14:16 +01:00
'R' , " dustRedstone " ,
'D' , " gemDiamond " ,
'G' , " gearDiamond " ) ;
2014-01-02 13:58:08 +01:00
2016-03-12 09:42:38 +01:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( assemblyTableBlock , 1 , 1 ) ,
2014-01-02 13:58:08 +01:00
" OWO " ,
" OCO " ,
" ORO " ,
2014-02-08 14:47:31 +01:00
'O' , Blocks . obsidian ,
'W' , Blocks . crafting_table ,
'C' , Blocks . chest ,
2016-03-12 09:42:38 +01:00
'R' , new ItemStack ( redstoneChipset , 1 , 0 ) ) ;
2014-01-02 13:58:08 +01:00
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( assemblyTableBlock , 1 , 2 ) ,
2015-04-20 17:06:33 +02:00
" OIO " ,
2014-01-02 13:58:08 +01:00
" OCO " ,
" OGO " ,
2014-02-08 14:47:31 +01:00
'O' , Blocks . obsidian ,
2015-04-20 17:06:33 +02:00
'I' , " ingotGold " ,
2014-01-02 13:58:08 +01:00
'C' , new ItemStack ( redstoneChipset , 1 , 0 ) ,
2014-11-11 23:14:16 +01:00
'G' , " gearDiamond " ) ;
2014-01-02 13:58:08 +01:00
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( assemblyTableBlock , 1 , 3 ) ,
2015-04-20 17:06:33 +02:00
" OIO " ,
2014-12-01 12:44:17 +01:00
" OCO " ,
" OGO " ,
'O' , Blocks . obsidian ,
2015-04-20 17:06:33 +02:00
'I' , " dustRedstone " ,
2014-12-01 12:44:17 +01:00
'C' , new ItemStack ( redstoneChipset , 1 , 0 ) ,
'G' , " gearGold " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( assemblyTableBlock , 1 , 4 ) ,
2015-02-24 14:39:23 +01:00
" OCO " ,
2015-04-20 17:06:33 +02:00
" ORO " ,
2015-02-24 14:39:23 +01:00
" OGO " ,
'O' , Blocks . obsidian ,
2015-04-20 17:06:33 +02:00
'R' , new ItemStack ( redstoneChipset , 1 , 0 ) ,
2015-09-06 16:12:44 +02:00
'C' , " gemEmerald " ,
2015-02-24 14:39:23 +01:00
'G' , " gearDiamond " ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( assemblyTableBlock , 1 , 5 ) ,
2015-04-20 17:06:33 +02:00
" OWO " ,
" ORO " ,
" OGO " ,
'O' , Blocks . obsidian ,
2015-09-06 16:12:44 +02:00
'W' , " craftingTableWood " ,
2015-04-20 17:06:33 +02:00
'G' , " gearGold " ,
'R' , new ItemStack ( redstoneChipset , 1 , 0 ) ) ;
2015-09-29 09:54:12 +02:00
BCRegistry . INSTANCE . addCraftingRecipe ( new ItemStack ( packagerBlock , 1 , 0 ) ,
2015-04-20 17:06:33 +02:00
" I " ,
" ICI " ,
" P " ,
'I' , " ingotIron " ,
2015-09-06 16:12:44 +02:00
'C' , " craftingTableWood " ,
2015-04-20 17:06:33 +02:00
'P' , Blocks . piston ) ;
2014-01-02 13:58:08 +01:00
// CHIPSETS
2014-12-29 22:17:40 +01:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:redstoneChipset " , Math . round ( 100000 * chipsetCostMultiplier ) , Chipset . RED . getStack ( ) ,
2014-11-11 23:14:16 +01:00
" dustRedstone " ) ;
2014-12-29 22:17:40 +01:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:ironChipset " , Math . round ( 200000 * chipsetCostMultiplier ) , Chipset . IRON . getStack ( ) ,
2014-11-11 23:14:16 +01:00
" dustRedstone " , " ingotIron " ) ;
2014-12-29 22:17:40 +01:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:goldChipset " , Math . round ( 400000 * chipsetCostMultiplier ) , Chipset . GOLD . getStack ( ) ,
2014-11-11 23:14:16 +01:00
" dustRedstone " , " ingotGold " ) ;
2014-12-29 22:17:40 +01:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:diamondChipset " , Math . round ( 800000 * chipsetCostMultiplier ) ,
2014-11-11 23:14:16 +01:00
Chipset . DIAMOND . getStack ( ) , " dustRedstone " , " gemDiamond " ) ;
2015-09-20 11:20:30 +02:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:emeraldChipset " , Math . round ( 1200000 * chipsetCostMultiplier ) ,
2015-06-14 09:12:47 +02:00
Chipset . EMERALD . getStack ( ) , " dustRedstone " , " gemEmerald " ) ;
2014-12-29 22:17:40 +01:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:pulsatingChipset " , Math . round ( 400000 * chipsetCostMultiplier ) ,
2014-11-11 23:14:16 +01:00
Chipset . PULSATING . getStack ( 2 ) , " dustRedstone " , Items . ender_pearl ) ;
2014-12-29 22:17:40 +01:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:quartzChipset " , Math . round ( 600000 * chipsetCostMultiplier ) , Chipset . QUARTZ . getStack ( ) ,
2014-11-11 23:14:16 +01:00
" dustRedstone " , " gemQuartz " ) ;
2014-12-29 22:17:40 +01:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:compChipset " , Math . round ( 600000 * chipsetCostMultiplier ) , Chipset . COMP . getStack ( ) ,
2014-11-11 23:14:16 +01:00
" dustRedstone " , Items . comparator ) ;
2014-01-02 13:58:08 +01:00
2014-05-27 00:25:39 +02:00
// ROBOTS AND BOARDS
2014-09-03 19:22:15 +02:00
BuildcraftRecipeRegistry . assemblyTable . addRecipe ( " buildcraft:redstoneCrystal " , 10000000 , new ItemStack (
2014-06-02 16:29:13 +02:00
redstoneCrystal ) , new ItemStack (
2014-05-27 00:25:39 +02:00
Blocks . redstone_block ) ) ;
2012-05-09 22:43:05 +02:00
}
2013-12-02 06:57:31 +01:00
2014-04-14 18:27:59 +02:00
@Mod.EventHandler
2015-06-14 09:12:47 +02:00
public void processIMCRequests ( FMLInterModComms . IMCEvent event ) {
2013-12-02 06:57:31 +01:00
InterModComms . processIMC ( event ) ;
}
2014-05-08 21:57:05 +02:00
@Mod.EventHandler
public void whiteListAppliedEnergetics ( FMLInitializationEvent event ) {
FMLInterModComms . sendMessage ( " appliedenergistics2 " , " whitelist-spatial " ,
TileLaser . class . getCanonicalName ( ) ) ;
FMLInterModComms . sendMessage ( " appliedenergistics2 " , " whitelist-spatial " ,
TileAssemblyTable . class . getCanonicalName ( ) ) ;
FMLInterModComms . sendMessage ( " appliedenergistics2 " , " whitelist-spatial " ,
TileAdvancedCraftingTable . class . getCanonicalName ( ) ) ;
FMLInterModComms . sendMessage ( " appliedenergistics2 " , " whitelist-spatial " ,
TileIntegrationTable . class . getCanonicalName ( ) ) ;
}
2014-10-19 10:18:23 +02:00
@Mod.EventHandler
2014-10-19 10:24:27 +02:00
public void remap ( FMLMissingMappingsEvent event ) {
2015-09-20 11:20:30 +02:00
for ( FMLMissingMappingsEvent . MissingMapping mapping : event . get ( ) ) {
2014-10-19 12:21:45 +02:00
if ( mapping . name . equals ( " BuildCraft|Silicon:null " ) ) {
2014-10-20 00:09:49 +02:00
if ( mapping . type = = GameRegistry . Type . ITEM ) {
2014-10-21 02:06:57 +02:00
mapping . remap ( Item . getItemFromBlock ( assemblyTableBlock ) ) ;
2014-10-20 00:09:49 +02:00
} else {
2014-10-21 02:06:57 +02:00
mapping . remap ( assemblyTableBlock ) ;
2014-10-20 00:09:49 +02:00
}
2014-10-19 12:21:45 +02:00
}
2015-03-04 22:44:44 +01:00
// Silicon -> Robotics migration code
if ( mapping . type = = GameRegistry . Type . ITEM ) {
if ( mapping . name . equals ( " BuildCraft|Silicon:robot " ) ) {
mapping . remap ( ( Item ) Item . itemRegistry . getObject ( " BuildCraft|Robotics:robot " ) ) ;
} else if ( mapping . name . equals ( " BuildCraft|Silicon:redstone_board " ) ) {
mapping . remap ( ( Item ) Item . itemRegistry . getObject ( " BuildCraft|Robotics:redstone_board " ) ) ;
} else if ( mapping . name . equals ( " BuildCraft|Silicon:requester " ) ) {
mapping . remap ( ( Item ) Item . itemRegistry . getObject ( " BuildCraft|Robotics:requester " ) ) ;
} else if ( mapping . name . equals ( " BuildCraft|Silicon:zonePlan " ) ) {
mapping . remap ( ( Item ) Item . itemRegistry . getObject ( " BuildCraft|Robotics:zonePlan " ) ) ;
}
} else if ( mapping . type = = GameRegistry . Type . BLOCK ) {
if ( mapping . name . equals ( " BuildCraft|Silicon:requester " ) ) {
mapping . remap ( Block . getBlockFromName ( " BuildCraft|Robotics:requester " ) ) ;
} else if ( mapping . name . equals ( " BuildCraft|Silicon:zonePlan " ) ) {
mapping . remap ( Block . getBlockFromName ( " BuildCraft|Robotics:zonePlan " ) ) ;
}
}
2014-10-19 10:18:23 +02:00
}
}
2012-05-09 22:43:05 +02:00
}