Re-updated main

This commit is contained in:
Francesco Macagno 2015-07-22 21:40:12 -07:00
parent 55bfa23705
commit 5c62c86da4

View file

@ -1,5 +1,31 @@
package cr0s.WarpDrive;
package cr0s.warpdrive;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeChunkManager.LoadingCallback;
import net.minecraftforge.common.ForgeChunkManager.Ticket;
import net.minecraftforge.common.ForgeChunkManager.Type;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
@ -9,70 +35,80 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import cr0s.WarpDrive.block.*;
import cr0s.WarpDrive.command.*;
import cr0s.WarpDrive.data.*;
import cr0s.WarpDrive.item.*;
import cr0s.WarpDrive.machines.*;
import cr0s.WarpDrive.render.*;
import cr0s.WarpDrive.world.*;
import cr0s.warpdrive.block.BlockAir;
import cr0s.warpdrive.block.BlockDecorative;
import cr0s.warpdrive.block.BlockGas;
import cr0s.warpdrive.block.BlockIridium;
import cr0s.warpdrive.block.BlockTransportBeacon;
import cr0s.warpdrive.block.ItemBlockDecorative;
import cr0s.warpdrive.command.DebugCommand;
import cr0s.warpdrive.command.GenerateCommand;
import cr0s.warpdrive.command.InvisibleCommand;
import cr0s.warpdrive.command.JumpgateCommand;
import cr0s.warpdrive.command.SpaceTpCommand;
import cr0s.warpdrive.data.CamRegistry;
import cr0s.warpdrive.data.CloakManager;
import cr0s.warpdrive.data.JumpgatesRegistry;
import cr0s.warpdrive.data.WarpCoresRegistry;
import cr0s.warpdrive.item.ItemReactorLaserFocus;
import cr0s.warpdrive.item.ItemWarpAirCanister;
import cr0s.warpdrive.item.ItemWarpArmor;
import cr0s.warpdrive.item.ItemWarpComponent;
import cr0s.warpdrive.item.ItemWarpUpgrade;
import cr0s.warpdrive.machines.BlockAirGenerator;
import cr0s.warpdrive.machines.BlockCamera;
import cr0s.warpdrive.machines.BlockChunkLoader;
import cr0s.warpdrive.machines.BlockCloakingCoil;
import cr0s.warpdrive.machines.BlockCloakingDeviceCore;
import cr0s.warpdrive.machines.BlockLaser;
import cr0s.warpdrive.machines.BlockLaserCam;
import cr0s.warpdrive.machines.BlockLaserReactorMonitor;
import cr0s.warpdrive.machines.BlockLaserTreeFarm;
import cr0s.warpdrive.machines.BlockLift;
import cr0s.warpdrive.machines.BlockMiningLaser;
import cr0s.warpdrive.machines.BlockMonitor;
import cr0s.warpdrive.machines.BlockParticleBooster;
import cr0s.warpdrive.machines.BlockPowerLaser;
import cr0s.warpdrive.machines.BlockPowerReactor;
import cr0s.warpdrive.machines.BlockPowerStore;
import cr0s.warpdrive.machines.BlockProtocol;
import cr0s.warpdrive.machines.BlockRadar;
import cr0s.warpdrive.machines.BlockReactor;
import cr0s.warpdrive.machines.BlockShipScanner;
import cr0s.warpdrive.machines.BlockTransporter;
import cr0s.warpdrive.machines.BlockWarpIsolation;
import cr0s.warpdrive.machines.TileEntityAirGenerator;
import cr0s.warpdrive.machines.TileEntityCamera;
import cr0s.warpdrive.machines.TileEntityChunkLoader;
import cr0s.warpdrive.machines.TileEntityCloakingDeviceCore;
import cr0s.warpdrive.machines.TileEntityLaser;
import cr0s.warpdrive.machines.TileEntityLaserReactorMonitor;
import cr0s.warpdrive.machines.TileEntityLaserTreeFarm;
import cr0s.warpdrive.machines.TileEntityLift;
import cr0s.warpdrive.machines.TileEntityMiningLaser;
import cr0s.warpdrive.machines.TileEntityMonitor;
import cr0s.warpdrive.machines.TileEntityParticleBooster;
import cr0s.warpdrive.machines.TileEntityPowerLaser;
import cr0s.warpdrive.machines.TileEntityPowerReactor;
import cr0s.warpdrive.machines.TileEntityPowerStore;
import cr0s.warpdrive.machines.TileEntityProtocol;
import cr0s.warpdrive.machines.TileEntityRadar;
import cr0s.warpdrive.machines.TileEntityReactor;
import cr0s.warpdrive.machines.TileEntityShipScanner;
import cr0s.warpdrive.machines.TileEntityTransporter;
import cr0s.warpdrive.machines.WarpChunkTE;
import cr0s.warpdrive.render.CameraOverlay;
import cr0s.warpdrive.world.BiomeSpace;
import cr0s.warpdrive.world.HyperSpaceProvider;
import cr0s.warpdrive.world.HyperSpaceWorldGenerator;
import cr0s.warpdrive.world.SpaceProvider;
import cr0s.warpdrive.world.SpaceWorldGenerator;
import dan200.computercraft.api.ComputerCraftAPI;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeChunkManager.LoadingCallback;
import net.minecraftforge.common.ForgeChunkManager.Ticket;
import net.minecraftforge.common.ForgeChunkManager.Type;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
@Mod(modid = "WarpDrive", name = "WarpDrive", version = "1.2.7.0",
dependencies = "required-after:IC2;"
+ " required-after:CoFHCore;"
+ " after:ComputerCraft;"
+ " after:OpenComputer;"
+ " after:CCTurtle;"
+ " after:gregtech_addon;"
+ " required-after:AppliedEnergistics;"
+ " after:AdvancedSolarPanel;"
+ " after:AtomicScience;"
+ " after:ICBM|Explosion;"
+ " after:MFFS;"
+ " after:GraviSuite;"
+ " after:UndergroundBiomes;"
+ " after:NetherOres")
@NetworkMod(clientSideRequired = true, serverSideRequired = true, channels = {
"WarpDriveBeam",
"WarpDriveFreq",
"WarpDriveLaserT",
"WarpDriveCloaks" }, packetHandler = PacketHandler.class)
@Mod(modid = "WarpDrive", name = "WarpDrive", version = "1.3.0.0", dependencies = "required-after:IC2;" + " required-after:CoFHCore;" + " after:ComputerCraft;"
+ " after:OpenComputer;" + " after:CCTurtle;" + " after:gregtech_addon;" + " required-after:AppliedEnergistics;" + " after:AdvancedSolarPanel;"
+ " after:AtomicScience;" + " after:ICBM|Explosion;" + " after:MFFS;" + " after:GraviSuite;" + " after:UndergroundBiomes;" + " after:NetherOres")
/**
* @author Cr0s
*/
@ -109,7 +145,7 @@ public class WarpDrive implements LoadingCallback {
public static ItemWarpComponent componentItem;
public static ItemWarpUpgrade upgradeItem;
public static EnumArmorMaterial armorMaterial = EnumHelper.addArmorMaterial("WARP", 5, new int[]{1, 3, 2, 1}, 15);
public static ArmorMaterial armorMaterial = EnumHelper.addArmorMaterial("WARP", 5, new int[] { 1, 3, 2, 1 }, 15);
public static ItemWarpArmor helmetItem;
public static ItemWarpAirCanister airCanisterItem;
@ -127,7 +163,7 @@ public class WarpDrive implements LoadingCallback {
@Instance("WarpDrive")
public static WarpDrive instance;
@SidedProxy(clientSide = "cr0s.WarpDrive.client.ClientProxy", serverSide = "cr0s.WarpDrive.CommonProxy")
@SidedProxy(clientSide = "cr0s.warpdrive.client.ClientProxy", serverSide = "cr0s.warpdrive.CommonProxy")
public static CommonProxy proxy;
public static WarpCoresRegistry warpCores;
@ -152,23 +188,20 @@ public class WarpDrive implements LoadingCallback {
if (FMLCommonHandler.instance().getSide().isClient()) {
Minecraft mc = Minecraft.getMinecraft();
// System.out.println("[WarpDrive] Registering sounds event handler...");
MinecraftForge.EVENT_BUS.register(new SoundHandler());
normalFOV = mc.gameSettings.fovSetting;
normalSensitivity = mc.gameSettings.mouseSensitivity;
WarpDrive.print("[WarpDrive] FOV is " + normalFOV + " Sensitivity is " + normalSensitivity);
}
}
@SideOnly(Side.CLIENT)
@EventHandler
public void init(FMLInitializationEvent event) {
// FIXME FMLInterModComms.sendMessage("Waila", "register", "cr0s.WarpDrive.client.WailaHandler.callbackRegister");
// FIXME FMLInterModComms.sendMessage("Waila", "register",
// "cr0s.warpdrive.client.WailaHandler.callbackRegister");
}
public static void print(String out) {
System.out.println((FMLCommonHandler.instance().getEffectiveSide().isClient() ? "Client ":"Server ") + out);
System.out.println((FMLCommonHandler.instance().getEffectiveSide().isClient() ? "Client " : "Server ") + out);
}
public static void debugPrint(String out) {
@ -182,178 +215,176 @@ public class WarpDrive implements LoadingCallback {
WarpDriveConfig.load();
// CORE CONTROLLER
protocolBlock = new BlockProtocol(WarpDriveConfig.controllerID,0, Material.rock);
protocolBlock = new BlockProtocol(0, Material.rock);
GameRegistry.registerBlock(protocolBlock, "protocolBlock");
GameRegistry.registerTileEntity(TileEntityProtocol.class, "protocolBlock");
// WARP CORE
warpCore = new BlockReactor(WarpDriveConfig.coreID, 0, Material.rock);
warpCore = new BlockReactor(0, Material.rock);
GameRegistry.registerBlock(warpCore, "warpCore");
GameRegistry.registerTileEntity(TileEntityReactor.class, "warpCore");
// WARP RADAR
radarBlock = new BlockRadar(WarpDriveConfig.radarID, 0, Material.rock);
radarBlock = new BlockRadar(0, Material.rock);
GameRegistry.registerBlock(radarBlock, "radarBlock");
GameRegistry.registerTileEntity(TileEntityRadar.class, "radarBlock");
// WARP ISOLATION
isolationBlock = new BlockWarpIsolation( WarpDriveConfig.isolationID, 0, Material.rock);
isolationBlock = new BlockWarpIsolation(0, Material.rock);
GameRegistry.registerBlock(isolationBlock, "isolationBlock");
// AIR GENERATOR
airgenBlock = new BlockAirGenerator(WarpDriveConfig.airgenID, 0,Material.rock);
airgenBlock = new BlockAirGenerator(0, Material.rock);
GameRegistry.registerBlock(airgenBlock, "airgenBlock");
GameRegistry.registerTileEntity(TileEntityAirGenerator.class, "airgenBlock");
// AIR BLOCK
airBlock = (new BlockAir(WarpDriveConfig.airID));
airBlock = new BlockAir();
GameRegistry.registerBlock(airBlock, "airBlock");
// GAS BLOCK
gasBlock = (new BlockGas(WarpDriveConfig.gasID));
gasBlock = new BlockGas();
GameRegistry.registerBlock(gasBlock, "gasBlock");
// LASER EMITTER
laserBlock = new BlockLaser(WarpDriveConfig.laserID, 0,Material.rock);
laserBlock = new BlockLaser(0, Material.rock);
GameRegistry.registerBlock(laserBlock, "laserBlock");
GameRegistry.registerTileEntity(TileEntityLaser.class, "laserBlock");
// LASER EMITTER WITH CAMERA
laserCamBlock = new BlockLaserCam(WarpDriveConfig.laserCamID, 0, Material.rock);
laserCamBlock = new BlockLaserCam(0, Material.rock);
GameRegistry.registerBlock(laserCamBlock, "laserCamBlock");
// CAMERA
cameraBlock = new BlockCamera(WarpDriveConfig.camID, 0,Material.rock);
cameraBlock = new BlockCamera(0, Material.rock);
GameRegistry.registerBlock(cameraBlock, "cameraBlock");
GameRegistry.registerTileEntity(TileEntityCamera.class, "cameraBlock");
// MONITOR
monitorBlock = new BlockMonitor(WarpDriveConfig.monitorID);
monitorBlock = new BlockMonitor();
GameRegistry.registerBlock(monitorBlock, "monitorBlock");
GameRegistry.registerTileEntity(TileEntityMonitor.class, "monitorBlock");
// MINING LASER
miningLaserBlock = new BlockMiningLaser(WarpDriveConfig.miningLaserID, 0, Material.rock);
miningLaserBlock = new BlockMiningLaser(0, Material.rock);
GameRegistry.registerBlock(miningLaserBlock, "miningLaserBlock");
GameRegistry.registerTileEntity(TileEntityMiningLaser.class, "miningLaserBlock");
// LASER TREE FARM
laserTreeFarmBlock = new BlockLaserTreeFarm(WarpDriveConfig.laserTreeFarmID, 0, Material.rock);
laserTreeFarmBlock = new BlockLaserTreeFarm(0, Material.rock);
GameRegistry.registerBlock(laserTreeFarmBlock, "laserTreeFarmBlock");
GameRegistry.registerTileEntity(TileEntityLaserTreeFarm.class,"laserTreeFarmBlock");
GameRegistry.registerTileEntity(TileEntityLaserTreeFarm.class, "laserTreeFarmBlock");
// PARTICLE BOOSTER
boosterBlock = new BlockParticleBooster(WarpDriveConfig.particleBoosterID, 0, Material.rock);
boosterBlock = new BlockParticleBooster(0, Material.rock);
GameRegistry.registerBlock(boosterBlock, "boosterBlock");
GameRegistry.registerTileEntity(TileEntityParticleBooster.class, "boosterBlock");
// LASER LIFT
liftBlock = new BlockLift(WarpDriveConfig.liftID, 0, Material.rock);
liftBlock = new BlockLift(0, Material.rock);
GameRegistry.registerBlock(liftBlock, "liftBlock");
GameRegistry.registerTileEntity(TileEntityLift.class, "liftBlock");
// IRIDIUM BLOCK
iridiumBlock = new BlockIridium(WarpDriveConfig.iridiumBlockID);
iridiumBlock = new BlockIridium();
GameRegistry.registerBlock(iridiumBlock, "iridiumBlock");
// SHIP SCANNER
scannerBlock = new BlockShipScanner(WarpDriveConfig.shipScannerID, 0, Material.rock);
scannerBlock = new BlockShipScanner(0, Material.rock);
GameRegistry.registerBlock(scannerBlock, "scannerBlock");
GameRegistry.registerTileEntity(TileEntityShipScanner.class, "scannerBlock");
// CLOAKING DEVICE CORE
cloakBlock = new BlockCloakingDeviceCore(WarpDriveConfig.cloakCoreID, 0, Material.rock);
cloakBlock = new BlockCloakingDeviceCore(0, Material.rock);
GameRegistry.registerBlock(cloakBlock, "cloakBlock");
GameRegistry.registerTileEntity(TileEntityCloakingDeviceCore.class, "cloakBlock");
// CLOAKING DEVICE COIL
cloakCoilBlock = new BlockCloakingCoil(WarpDriveConfig.cloakCoilID, 0, Material.rock);
cloakCoilBlock = new BlockCloakingCoil(0, Material.rock);
GameRegistry.registerBlock(cloakCoilBlock, "cloakCoilBlock");
// TRANSPORTER
transporterBlock = new BlockTransporter(WarpDriveConfig.transporterID,Material.rock);
transporterBlock = new BlockTransporter(Material.rock);
GameRegistry.registerBlock(transporterBlock, "transporter");
GameRegistry.registerTileEntity(TileEntityTransporter.class,"transporter");
GameRegistry.registerTileEntity(TileEntityTransporter.class, "transporter");
// REACTOR MONITOR
reactorMonitorBlock = new BlockLaserReactorMonitor(WarpDriveConfig.reactorMonitorID, Material.rock);
reactorMonitorBlock = new BlockLaserReactorMonitor(Material.rock);
GameRegistry.registerBlock(reactorMonitorBlock, "reactorMonitor");
GameRegistry.registerTileEntity(TileEntityLaserReactorMonitor.class,"reactorMonitor");
GameRegistry.registerTileEntity(TileEntityLaserReactorMonitor.class, "reactorMonitor");
// TRANSPORT BEACON
transportBeaconBlock = new BlockTransportBeacon(WarpDriveConfig.transportBeaconID);
transportBeaconBlock = new BlockTransportBeacon();
GameRegistry.registerBlock(transportBeaconBlock, "transportBeacon");
// POWER REACTOR, LASER, STORE
powerReactorBlock = new BlockPowerReactor(WarpDriveConfig.powerReactorID);
GameRegistry.registerBlock(powerReactorBlock,"powerReactor");
powerReactorBlock = new BlockPowerReactor();
GameRegistry.registerBlock(powerReactorBlock, "powerReactor");
GameRegistry.registerTileEntity(TileEntityPowerReactor.class, "powerReactor");
powerLaserBlock = new BlockPowerLaser(WarpDriveConfig.powerLaserID);
powerLaserBlock = new BlockPowerLaser();
GameRegistry.registerBlock(powerLaserBlock, "powerLaser");
GameRegistry.registerTileEntity(TileEntityPowerLaser.class, "powerLaser");
powerStoreBlock = new BlockPowerStore(WarpDriveConfig.powerStoreID);
GameRegistry.registerBlock(powerStoreBlock,"powerStore");
powerStoreBlock = new BlockPowerStore();
GameRegistry.registerBlock(powerStoreBlock, "powerStore");
GameRegistry.registerTileEntity(TileEntityPowerStore.class, "powerStore");
// CHUNK LOADER
chunkLoaderBlock = new BlockChunkLoader(WarpDriveConfig.chunkLoaderID);
chunkLoaderBlock = new BlockChunkLoader();
GameRegistry.registerBlock(chunkLoaderBlock, "chunkLoader");
GameRegistry.registerTileEntity(TileEntityChunkLoader.class, "chunkLoader");
// DECORATIVE
decorativeBlock = new BlockDecorative(WarpDriveConfig.decorativeID);
decorativeBlock = new BlockDecorative();
GameRegistry.registerBlock(decorativeBlock, ItemBlockDecorative.class, "decorative");
// REACTOR LASER FOCUS
reactorLaserFocusItem = new ItemReactorLaserFocus(WarpDriveConfig.reactorLaserFocusID);
reactorLaserFocusItem = new ItemReactorLaserFocus();
GameRegistry.registerItem(reactorLaserFocusItem, "reactorLaserFocus");
// COMPONENT ITEMS
componentItem = new ItemWarpComponent(WarpDriveConfig.componentID);
componentItem = new ItemWarpComponent();
GameRegistry.registerItem(componentItem, "component");
helmetItem = new ItemWarpArmor(WarpDriveConfig.helmetID, 0);
helmetItem = new ItemWarpArmor(armorMaterial, 0);
GameRegistry.registerItem(helmetItem, "helmet");
airCanisterItem = new ItemWarpAirCanister(WarpDriveConfig.airCanisterID);
airCanisterItem = new ItemWarpAirCanister();
GameRegistry.registerItem(airCanisterItem, "airCanisterFull");
upgradeItem = new ItemWarpUpgrade(WarpDriveConfig.upgradeID);
upgradeItem = new ItemWarpUpgrade();
GameRegistry.registerItem(upgradeItem, "upgrade");
proxy.registerEntities();
ForgeChunkManager.setForcedChunkLoadingCallback(instance, instance);
spaceWorldGenerator = new SpaceWorldGenerator();
GameRegistry.registerWorldGenerator(spaceWorldGenerator);
GameRegistry.registerWorldGenerator(spaceWorldGenerator, 0);
hyperSpaceWorldGenerator = new HyperSpaceWorldGenerator();
GameRegistry.registerWorldGenerator(hyperSpaceWorldGenerator);
GameRegistry.registerWorldGenerator(hyperSpaceWorldGenerator, 0);
registerSpaceDimension();
registerHyperSpaceDimension();
@ -381,7 +412,8 @@ public class WarpDrive implements LoadingCallback {
if (WarpDriveConfig.isICLoaded && WarpDriveConfig.G_ENABLE_IC2_RECIPES) {
initIC2Recipes();
}
if (WarpDriveConfig.isAppliedEnergisticsLoaded && WarpDriveConfig.isThermalExpansionLoaded && WarpDriveConfig.isAtomicScienceLoaded && WarpDriveConfig.G_ENABLE_TDK_RECIPES) {
if (WarpDriveConfig.isAppliedEnergisticsLoaded && WarpDriveConfig.isThermalExpansionLoaded && WarpDriveConfig.isAtomicScienceLoaded
&& WarpDriveConfig.G_ENABLE_TDK_RECIPES) {
initAETERecipes();
}
if (WarpDriveConfig.G_ENABLE_VANILLA_RECIPES) {
@ -398,159 +430,92 @@ public class WarpDrive implements LoadingCallback {
decorativeBlock.initRecipes();
upgradeItem.initRecipes();
//WarpCore
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(warpCore), false, "ipi", "ici", "idi",
'i', Item.ingotIron,
'p', componentItem.getIS(6),
'c', componentItem.getIS(2),
'd', Item.diamond));
// WarpCore
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(warpCore), false, "ipi", "ici", "idi", 'i', Items.iron_ingot, 'p', componentItem.getIS(6),
'c', componentItem.getIS(2), 'd', Items.diamond));
//Controller
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(protocolBlock), false, "ici", "idi", "iii",
'i', Item.ingotIron,
'c', componentItem.getIS(5),
'd', Item.diamond));
// Controller
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(protocolBlock), false, "ici", "idi", "iii", 'i', Items.iron_ingot, 'c',
componentItem.getIS(5), 'd', Items.diamond));
//Radar
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(radarBlock), false, "ggg", "pdc", "iii",
'i', Item.ingotIron,
'c', componentItem.getIS(5),
'p', componentItem.getIS(6),
'g', Block.glass,
'd', Item.diamond));
// Radar
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(radarBlock), false, "ggg", "pdc", "iii", 'i', Items.iron_ingot, 'c', componentItem.getIS(5),
'p', componentItem.getIS(6), 'g', Blocks.glass, 'd', Items.diamond));
//Isolation Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(isolationBlock), false, "igi", "geg", "igi",
'i', Item.ingotIron,
'g', Block.glass,
'e', Item.enderPearl));
// Isolation Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(isolationBlock), false, "igi", "geg", "igi", 'i', Items.iron_ingot, 'g', Blocks.glass, 'e',
Items.ender_pearl));
//Air generator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(airgenBlock), false, "ibi", "i i", "ipi",
'i', Item.ingotIron,
'b', Block.fenceIron,
'p', componentItem.getIS(6)));
// Air generator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(airgenBlock), false, "ibi", "i i", "ipi", 'i', Items.iron_ingot, 'b', Blocks.iron_bars, 'p',
componentItem.getIS(6)));
//Laser
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(laserBlock), false, "ili", "iri", "ici",
'i', Item.ingotIron,
'r', Item.redstone,
'c', componentItem.getIS(5),
'l', componentItem.getIS(3),
'p', componentItem.getIS(6)));
// Laser
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(laserBlock), false, "ili", "iri", "ici", 'i', Items.iron_ingot, 'r', Items.redstone, 'c',
componentItem.getIS(5), 'l', componentItem.getIS(3), 'p', componentItem.getIS(6)));
//Mining laser
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(miningLaserBlock), false, "ici", "iti", "ili",
'i', Item.ingotIron,
'r', Item.redstone,
't', componentItem.getIS(1),
'c', componentItem.getIS(5),
'l', componentItem.getIS(3)));
// Mining laser
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(miningLaserBlock), false, "ici", "iti", "ili", 'i', Items.iron_ingot, 'r', Items.redstone,
't', componentItem.getIS(1), 'c', componentItem.getIS(5), 'l', componentItem.getIS(3)));
//Tree farm laser
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(laserTreeFarmBlock), false, "ili", "sts", "ici",
'i', Item.ingotIron,
's', "treeSapling",
't', componentItem.getIS(1),
'c', componentItem.getIS(5),
'l', componentItem.getIS(3)));
// Tree farm laser
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(laserTreeFarmBlock), false, "ili", "sts", "ici", 'i', Items.iron_ingot, 's', "treeSapling",
't', componentItem.getIS(1), 'c', componentItem.getIS(5), 'l', componentItem.getIS(3)));
//Laser Lift
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(liftBlock), false, "ipi", "rtr", "ili",
'i', Item.ingotIron,
'r', Item.redstone,
't', componentItem.getIS(1),
'l', componentItem.getIS(3),
'p', componentItem.getIS(6)));
// Laser Lift
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(liftBlock), false, "ipi", "rtr", "ili", 'i', Items.iron_ingot, 'r', Items.redstone, 't',
componentItem.getIS(1), 'l', componentItem.getIS(3), 'p', componentItem.getIS(6)));
//Transporter
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(transporterBlock), false, "iii", "ptc", "iii",
'i', Item.ingotIron,
't', componentItem.getIS(1),
'c', componentItem.getIS(5),
'p', componentItem.getIS(6)));
// Transporter
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(transporterBlock), false, "iii", "ptc", "iii", 'i', Items.iron_ingot, 't', componentItem
.getIS(1), 'c', componentItem.getIS(5), 'p', componentItem.getIS(6)));
//Particle Booster
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(boosterBlock), false, "ipi", "rgr", "iii",
'i', Item.ingotIron,
'r', Item.redstone,
'g', Block.glass,
'p', componentItem.getIS(6)));
// Particle Booster
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(boosterBlock), false, "ipi", "rgr", "iii", 'i', Items.iron_ingot, 'r', Items.redstone, 'g',
Blocks.glass, 'p', componentItem.getIS(6)));
//Camera
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(cameraBlock), false, "ngn", "i i", "ici",
'i', Item.ingotIron,
'n', Item.goldNugget,
'g', Block.glass,
'c', componentItem.getIS(5)));
// Camera
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(cameraBlock), false, "ngn", "i i", "ici", 'i', Items.iron_ingot, 'n', Items.gold_nugget, 'g',
Blocks.glass, 'c', componentItem.getIS(5)));
//LaserCamera
// LaserCamera
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(laserCamBlock), cameraBlock, laserBlock));
//Monitor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(monitorBlock), false, "ggg", "iti", "ici",
'i', Item.ingotIron,
't', Block.torchWood,
'g', Block.glass,
'c', componentItem.getIS(5)));
// Monitor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(monitorBlock), false, "ggg", "iti", "ici", 'i', Items.iron_ingot, 't', Blocks.torch, 'g',
Blocks.glass, 'c', componentItem.getIS(5)));
//Cloaking device
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(cloakBlock), false, "ipi", "lrl", "ici",
'i', Item.ingotIron,
'r', Item.redstone,
'l', componentItem.getIS(3),
'c', componentItem.getIS(5),
'p', componentItem.getIS(6)));
// Cloaking device
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(cloakBlock), false, "ipi", "lrl", "ici", 'i', Items.iron_ingot, 'r', Items.redstone, 'l',
componentItem.getIS(3), 'c', componentItem.getIS(5), 'p', componentItem.getIS(6)));
//Cloaking coil
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(cloakCoilBlock), false, "ini", "rdr", "ini",
'i', Item.ingotIron,
'd', Item.diamond,
'r', Item.redstone,
'n', Item.goldNugget));
// Cloaking coil
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(cloakCoilBlock), false, "ini", "rdr", "ini", 'i', Items.iron_ingot, 'd', Items.diamond, 'r',
Items.redstone, 'n', Items.gold_nugget));
//Power Laser
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(powerLaserBlock), false, "iii", "ilg", "ici",
'i', Item.ingotIron,
'g', Block.glass,
'c', componentItem.getIS(5),
'l', componentItem.getIS(3)));
// Power Laser
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(powerLaserBlock), false, "iii", "ilg", "ici", 'i', Items.iron_ingot, 'g', Blocks.glass, 'c',
componentItem.getIS(5), 'l', componentItem.getIS(3)));
//Power Reactor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(powerReactorBlock), false, "ipi", "gog", "ici",
'i', Item.ingotIron,
'g', Block.glass,
'o', componentItem.getIS(4),
'c', componentItem.getIS(5),
'p', componentItem.getIS(6)));
// Power Reactor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(powerReactorBlock), false, "ipi", "gog", "ici", 'i', Items.iron_ingot, 'g', Blocks.glass, 'o',
componentItem.getIS(4), 'c', componentItem.getIS(5), 'p', componentItem.getIS(6)));
//Power Store
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(powerStoreBlock), false, "ipi", "isi", "ici",
'i', Item.ingotIron,
's', componentItem.getIS(7),
'c', componentItem.getIS(5),
'p', componentItem.getIS(6)));
// Power Store
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(powerStoreBlock), false, "ipi", "isi", "ici", 'i', Items.iron_ingot, 's', componentItem
.getIS(7), 'c', componentItem.getIS(5), 'p', componentItem.getIS(6)));
//Transport Beacon
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(transportBeaconBlock), false, " e ", "ldl", " s ",
'e', Item.enderPearl,
'l', "dyeBlue",
'd', Item.diamond,
's', Item.stick));
// Transport Beacon
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(transportBeaconBlock), false, " e ", "ldl", " s ", 'e', Items.ender_pearl, 'l', "dyeBlue",
'd', Items.diamond, 's', Items.stick));
//Chunk Loader
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(chunkLoaderBlock), false, "ipi", "ici", "ifi",
'i', Item.ingotIron,
'p', componentItem.getIS(6),
'c', componentItem.getIS(0),
'f', componentItem.getIS(5)));
// Chunk Loader
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(chunkLoaderBlock), false, "ipi", "ici", "ifi", 'i', Items.iron_ingot, 'p', componentItem
.getIS(6), 'c', componentItem.getIS(0), 'f', componentItem.getIS(5)));
//Helmet
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(helmetItem), false, "iii", "iwi", "gcg",
'i', Item.ingotIron,
'w', Block.cloth,
'g', Block.glass,
'c', componentItem.getIS(8)));
// Helmet
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(helmetItem), false, "iii", "iwi", "gcg", 'i', Items.iron_ingot, 'w', Blocks.wool, 'g',
Blocks.glass, 'c', componentItem.getIS(8)));
}
private static void initAETERecipes() {
@ -564,168 +529,103 @@ public class WarpDrive implements LoadingCallback {
ItemStack antimatter = GameRegistry.findItemStack("ResonantInduction|Atomic", "antimatter", 1);
antimatter.setItemDamage(0);
ItemStack floppy = GameRegistry.findItemStack("ComputerCraft", "disk", 1);
ItemStack ultimateLappack = new ItemStack(WarpDriveConfig.GS_ultimateLappack, 1, 1);
ItemStack ultimateLappack = WarpDriveConfig.GS_ultimateLappack.copy();
// top = advancedCircuit, redstoneEnergycell, advancedCircuit
// middle = fluix crystal, advancedMachine, fluix crystal
// bottom = advancedCircuit, bucket Resonant ender, advancedCircuit
GameRegistry.addRecipe(new ItemStack(warpCore), "crc", "fmf", "cec",
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'r', redstoneEnergycell,
'e', bucketEnder,
'f', fluixCrystal);
GameRegistry.addRecipe(new ItemStack(warpCore), "crc", "fmf", "cec", 'm', WarpDriveConfig.getIC2Item("advancedMachine"), 'c',
WarpDriveConfig.getIC2Item("advancedCircuit"), 'r', redstoneEnergycell, 'e', bucketEnder, 'f', fluixCrystal);
// top = advancedCircuit, floppy, advancedCircuit
// middle = advancedCircuit, advancedMachine, advancedCircuit
// bottom = advancedCircuit, fluix crystal, advancedCircuit
GameRegistry.addRecipe(new ItemStack(protocolBlock), "coc", "cmc", "cfc",
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'o', floppy,
'f', fluixCrystal);
GameRegistry.addRecipe(new ItemStack(protocolBlock), "coc", "cmc", "cfc", 'm', WarpDriveConfig.getIC2Item("advancedMachine"), 'c',
WarpDriveConfig.getIC2Item("advancedCircuit"), 'o', floppy, 'f', fluixCrystal);
// top = Iridium plate, Resonant Energycell, Iridium plate
// middle = Singularity, 125 milligram antimatter, Singularity
// bottom = Iridium plate, Ultimate lappack, Iridium plate
GameRegistry.addRecipe(new ItemStack(powerReactorBlock), "iri", "sas", "ili",
'i', WarpDriveConfig.getIC2Item("iridiumPlate"),
's', quantumEntangledSingularity,
'a', antimatter,
'l', ultimateLappack,
'r', resonantEnergycell);
GameRegistry.addRecipe(new ItemStack(powerReactorBlock), "iri", "sas", "ili", 'i', WarpDriveConfig.getIC2Item("iridiumPlate"), 's',
quantumEntangledSingularity, 'a', antimatter, 'l', ultimateLappack, 'r', resonantEnergycell);
// top = Advanced circuit, Advanced alloy, Advanced alloy
// middle = Advanced circuit, Warp drive laser, Vibrant quartz glass
// bottom = Advanced circuit, Certus quartz tank, Advanced alloy
ItemStack isMiningLaserBlock = new ItemStack(miningLaserBlock.blockID, 1, 0);
ItemStack isCertusQuartzTank = new ItemStack(WarpDriveConfig.AEExtra_certusQuartzTank.blockID, 1, 0);
ItemStack isMiningLaserBlock = new ItemStack(miningLaserBlock, 1, 0);
ItemStack isCertusQuartzTank = new ItemStack(WarpDriveConfig.AEExtra_certusQuartzTank, 1, 0);
GameRegistry.addRecipe(new ItemStack(powerLaserBlock), "caa", "czg", "cta",
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'a', WarpDriveConfig.getIC2Item("advancedAlloy"),
'z', isMiningLaserBlock,
't', isCertusQuartzTank,
'g', vibrantQuartzGlass);
GameRegistry.addRecipe(new ItemStack(powerLaserBlock), "caa", "czg", "cta", 'c', WarpDriveConfig.getIC2Item("advancedCircuit"), 'a',
WarpDriveConfig.getIC2Item("advancedAlloy"), 'z', isMiningLaserBlock, 't', isCertusQuartzTank, 'g', vibrantQuartzGlass);
}
private static void initIC2Recipes() {
GameRegistry.addRecipe(new ItemStack(warpCore), "ici", "cmc", "ici",
'i', WarpDriveConfig.getIC2Item("iridiumPlate"),
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"));
GameRegistry.addRecipe(new ItemStack(warpCore), "ici", "cmc", "ici", 'i', WarpDriveConfig.getIC2Item("iridiumPlate"), 'm',
WarpDriveConfig.getIC2Item("advancedMachine"), 'c', WarpDriveConfig.getIC2Item("advancedCircuit"));
GameRegistry.addRecipe(new ItemStack(protocolBlock), "iic", "imi", "cii",
'i', WarpDriveConfig.getIC2Item("iridiumPlate"),
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"));
GameRegistry.addRecipe(new ItemStack(protocolBlock), "iic", "imi", "cii", 'i', WarpDriveConfig.getIC2Item("iridiumPlate"), 'm',
WarpDriveConfig.getIC2Item("advancedMachine"), 'c', WarpDriveConfig.getIC2Item("advancedCircuit"));
GameRegistry.addRecipe(new ItemStack(radarBlock), "ifi", "imi", "imi",
'i', WarpDriveConfig.getIC2Item("iridiumPlate"),
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'f', WarpDriveConfig.getIC2Item("frequencyTransmitter"));
GameRegistry.addRecipe(new ItemStack(radarBlock), "ifi", "imi", "imi", 'i', WarpDriveConfig.getIC2Item("iridiumPlate"), 'm',
WarpDriveConfig.getIC2Item("advancedMachine"), 'f', WarpDriveConfig.getIC2Item("frequencyTransmitter"));
GameRegistry.addRecipe(new ItemStack(isolationBlock), "iii", "idi", "iii",
'i', WarpDriveConfig.getIC2Item("iridiumPlate"),
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'd', Block.blockDiamond);
GameRegistry.addRecipe(new ItemStack(isolationBlock), "iii", "idi", "iii", 'i', WarpDriveConfig.getIC2Item("iridiumPlate"), 'm',
WarpDriveConfig.getIC2Item("advancedMachine"), 'd', Blocks.diamond_block);
GameRegistry.addRecipe(new ItemStack(airgenBlock), "lcl", "lml", "lll",
'l', Block.leaves,
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"));
GameRegistry.addRecipe(new ItemStack(airgenBlock), "lcl", "lml", "lll", 'l', Blocks.leaves, 'm', WarpDriveConfig.getIC2Item("advancedMachine"), 'c',
WarpDriveConfig.getIC2Item("advancedCircuit"));
GameRegistry.addRecipe(new ItemStack(laserBlock), "sss", "ama", "aaa",
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'a', WarpDriveConfig.getIC2Item("advancedAlloy"),
's', WarpDriveConfig.getIC2Item("advancedCircuit"));
GameRegistry.addRecipe(new ItemStack(laserBlock), "sss", "ama", "aaa", 'm', WarpDriveConfig.getIC2Item("advancedMachine"), 'a',
WarpDriveConfig.getIC2Item("advancedAlloy"), 's', WarpDriveConfig.getIC2Item("advancedCircuit"));
GameRegistry.addRecipe(new ItemStack(miningLaserBlock), "aaa", "ama", "ccc",
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'a', WarpDriveConfig.getIC2Item("advancedAlloy"),
'm', WarpDriveConfig.getIC2Item("miner"));
GameRegistry.addRecipe(new ItemStack(miningLaserBlock), "aaa", "ama", "ccc", 'c', WarpDriveConfig.getIC2Item("advancedCircuit"), 'a',
WarpDriveConfig.getIC2Item("advancedAlloy"), 'm', WarpDriveConfig.getIC2Item("miner"));
GameRegistry.addRecipe(new ItemStack(boosterBlock), "afc", "ama", "cfa",
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'a', WarpDriveConfig.getIC2Item("advancedAlloy"),
'f', WarpDriveConfig.getIC2Item("glassFiberCableItem"),
'm', WarpDriveConfig.getIC2Item("mfeUnit"));
GameRegistry
.addRecipe(new ItemStack(boosterBlock), "afc", "ama", "cfa", 'c', WarpDriveConfig.getIC2Item("advancedCircuit"), 'a',
WarpDriveConfig.getIC2Item("advancedAlloy"), 'f', WarpDriveConfig.getIC2Item("glassFiberCableItem"), 'm',
WarpDriveConfig.getIC2Item("mfeUnit"));
GameRegistry.addRecipe(new ItemStack(liftBlock), "aca", "ama", "a#a",
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'a', WarpDriveConfig.getIC2Item("advancedAlloy"),
'm', WarpDriveConfig.getIC2Item("magnetizer"));
GameRegistry.addRecipe(new ItemStack(liftBlock), "aca", "ama", "a#a", 'c', WarpDriveConfig.getIC2Item("advancedCircuit"), 'a',
WarpDriveConfig.getIC2Item("advancedAlloy"), 'm', WarpDriveConfig.getIC2Item("magnetizer"));
GameRegistry.addRecipe(new ItemStack(iridiumBlock), "iii", "iii", "iii",
'i', WarpDriveConfig.getIC2Item("iridiumPlate"));
GameRegistry.addRecipe(new ItemStack(iridiumBlock), "iii", "iii", "iii", 'i', WarpDriveConfig.getIC2Item("iridiumPlate"));
GameRegistry.addShapelessRecipe(
new ItemStack(WarpDriveConfig.getIC2Item("iridiumPlate").getItem(), 9),
new ItemStack(iridiumBlock));
GameRegistry.addShapelessRecipe(new ItemStack(WarpDriveConfig.getIC2Item("iridiumPlate").getItem(), 9), new ItemStack(iridiumBlock));
GameRegistry.addRecipe(new ItemStack(laserCamBlock), "imi", "cec", "#k#",
'i', WarpDriveConfig.getIC2Item("iridiumPlate"),
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'e', laserBlock,
'k', cameraBlock);
GameRegistry.addRecipe(new ItemStack(laserCamBlock), "imi", "cec", "#k#", 'i', WarpDriveConfig.getIC2Item("iridiumPlate"), 'm',
WarpDriveConfig.getIC2Item("advancedMachine"), 'c', WarpDriveConfig.getIC2Item("advancedCircuit"), 'e', laserBlock, 'k', cameraBlock);
GameRegistry.addRecipe(new ItemStack(cameraBlock), "cgc", "gmg", "cgc",
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'g', Block.glass);
GameRegistry.addRecipe(new ItemStack(cameraBlock), "cgc", "gmg", "cgc", 'm', WarpDriveConfig.getIC2Item("advancedMachine"), 'c',
WarpDriveConfig.getIC2Item("advancedCircuit"), 'g', Blocks.glass);
GameRegistry.addRecipe(new ItemStack(monitorBlock), "gcg", "gmg", "ggg",
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'g', Block.glass);
GameRegistry.addRecipe(new ItemStack(monitorBlock), "gcg", "gmg", "ggg", 'm', WarpDriveConfig.getIC2Item("advancedMachine"), 'c',
WarpDriveConfig.getIC2Item("advancedCircuit"), 'g', Blocks.glass);
GameRegistry.addRecipe(new ItemStack(scannerBlock), "sgs", "mma", "amm",
'm', WarpDriveConfig.getIC2Item("advancedMachine"),
'a', WarpDriveConfig.getIC2Item("advancedAlloy"),
's', WarpDriveConfig.getIC2Item("advancedCircuit"),
'g', Block.glass);
GameRegistry.addRecipe(new ItemStack(scannerBlock), "sgs", "mma", "amm", 'm', WarpDriveConfig.getIC2Item("advancedMachine"), 'a',
WarpDriveConfig.getIC2Item("advancedAlloy"), 's', WarpDriveConfig.getIC2Item("advancedCircuit"), 'g', Blocks.glass);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(laserTreeFarmBlock),false,new Object[] {
"cwc", "wmw", "cwc",
'c', WarpDriveConfig.getIC2Item("electronicCircuit"),
'w', "logWood",
'm', miningLaserBlock }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(laserTreeFarmBlock), false, new Object[] { "cwc", "wmw", "cwc", 'c',
WarpDriveConfig.getIC2Item("electronicCircuit"), 'w', "logWood", 'm', miningLaserBlock }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(transporterBlock), false, new Object[] {
"ece", "imi", "iei",
'e', Item.enderPearl,
'c', WarpDriveConfig.getIC2Item("electronicCircuit"),
'i', WarpDriveConfig.getIC2Item("plateiron"),
'm', WarpDriveConfig.getIC2Item("machine") }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(transporterBlock), false, new Object[] { "ece", "imi", "iei", 'e', Items.ender_pearl, 'c',
WarpDriveConfig.getIC2Item("electronicCircuit"), 'i', WarpDriveConfig.getIC2Item("plateiron"), 'm', WarpDriveConfig.getIC2Item("machine") }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(reactorLaserFocusItem),false,new Object[] {
" p ", "pdp", " p ",
'p', WarpDriveConfig.getIC2Item("plateiron"),
'd', "gemDiamond"}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(reactorLaserFocusItem), false, new Object[] { " p ", "pdp", " p ", 'p',
WarpDriveConfig.getIC2Item("plateiron"), 'd', "gemDiamond" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(reactorMonitorBlock), false, new Object[] {
"pdp", "dmd", "pdp",
'p', WarpDriveConfig.getIC2Item("plateiron"),
'd', "gemDiamond",
'm', WarpDriveConfig.getIC2Item("mfeUnit")}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(reactorMonitorBlock), false, new Object[] { "pdp", "dmd", "pdp", 'p',
WarpDriveConfig.getIC2Item("plateiron"), 'd', "gemDiamond", 'm', WarpDriveConfig.getIC2Item("mfeUnit") }));
GameRegistry.addRecipe(new ItemStack(cloakBlock), "imi", "mcm", "imi",
'i', iridiumBlock,
'c', cloakCoilBlock,
'm', WarpDriveConfig.getIC2Item("advancedMachine"));
GameRegistry.addRecipe(new ItemStack(cloakBlock), "imi", "mcm", "imi", 'i', iridiumBlock, 'c', cloakCoilBlock, 'm',
WarpDriveConfig.getIC2Item("advancedMachine"));
GameRegistry.addRecipe(new ItemStack(cloakCoilBlock), "iai", "aca", "iai",
'i', WarpDriveConfig.getIC2Item("iridiumPlate"),
'c', WarpDriveConfig.getIC2Item("advancedCircuit"),
'a', WarpDriveConfig.getIC2Item("advancedAlloy"));
GameRegistry.addRecipe(new ItemStack(cloakCoilBlock), "iai", "aca", "iai", 'i', WarpDriveConfig.getIC2Item("iridiumPlate"), 'c',
WarpDriveConfig.getIC2Item("advancedCircuit"), 'a', WarpDriveConfig.getIC2Item("advancedAlloy"));
}
private static void registerSpaceDimension() {
spaceBiome = (new BiomeSpace(24))
.setColor(0)
.setDisableRain()
.setBiomeName("Space");
spaceBiome = (new BiomeSpace(24)).setColor(0).setDisableRain().setBiomeName("Space");
DimensionManager.registerProviderType(WarpDriveConfig.G_SPACE_PROVIDER_ID, SpaceProvider.class, true);
DimensionManager.registerDimension(WarpDriveConfig.G_SPACE_DIMENSION_ID, WarpDriveConfig.G_SPACE_PROVIDER_ID);
}
@ -748,63 +648,49 @@ public class WarpDrive implements LoadingCallback {
}
public Ticket registerChunkLoadTE(WarpChunkTE te, boolean refreshLoading) {
World worldObj = te.worldObj;
if (ForgeChunkManager.ticketCountAvailableFor(this, worldObj) > 0)
{
World worldObj = te.getWorldObj();
if (ForgeChunkManager.ticketCountAvailableFor(this, worldObj) > 0) {
Ticket t = ForgeChunkManager.requestTicket(this, worldObj, Type.NORMAL);
if (t != null) {
te.giveTicket(t); // FIXME calling the caller is a bad idea
if(refreshLoading)
if (refreshLoading)
te.refreshLoading();
return t;
}
else
{
} else {
WarpDrive.debugPrint("Ticket not granted");
}
}
else
{
} else {
WarpDrive.debugPrint("No tickets left!");
}
return null;
}
public Ticket registerChunkLoadTE(WarpChunkTE te)
{
public Ticket registerChunkLoadTE(WarpChunkTE te) {
return registerChunkLoadTE(te, true);
}
public Ticket getTicket(WarpChunkTE te)
{
public Ticket getTicket(WarpChunkTE te) {
return registerChunkLoadTE(te, false);
}
@Override
public void ticketsLoaded(List<Ticket> tickets, World world)
{
for (Ticket ticket : tickets)
{
public void ticketsLoaded(List<Ticket> tickets, World world) {
for (Ticket ticket : tickets) {
NBTTagCompound data = ticket.getModData();
if(data != null)
{
if (data != null) {
int w = data.getInteger("ticketWorldObj");
int x = data.getInteger("ticketX");
int y = data.getInteger("ticketY");
int z = data.getInteger("ticketZ");
if(w != 0 || x != 0 || y != 0 || z != 0)
{
if (w != 0 || x != 0 || y != 0 || z != 0) {
WorldServer ws = DimensionManager.getWorld(w);
if(ws != null)
{
TileEntity te = ws.getBlockTileEntity(x, y, z);
if(te != null && te instanceof WarpChunkTE)
{
if(((WarpChunkTE)te).shouldChunkLoad())
{
if (ws != null) {
TileEntity te = ws.getTileEntity(x, y, z);
if (te != null && te instanceof WarpChunkTE) {
if (((WarpChunkTE) te).shouldChunkLoad()) {
WarpDrive.debugPrint("[TicketCallback] Regiving Ticket!");
((WarpChunkTE)te).giveTicket(ticket);
((WarpChunkTE)te).refreshLoading(true);
((WarpChunkTE) te).giveTicket(ticket);
((WarpChunkTE) te).refreshLoading(true);
return;
}
}