Added world gen loading strucutre
This commit is contained in:
parent
65aebd3b58
commit
09308071e6
2 changed files with 229 additions and 222 deletions
|
@ -2,8 +2,6 @@ package cr0s.warpdrive;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -28,6 +26,9 @@ import net.minecraftforge.common.config.Configuration;
|
|||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
|
@ -119,7 +120,7 @@ import dan200.computercraft.api.ComputerCraftAPI;
|
|||
public class WarpDrive implements LoadingCallback {
|
||||
public static final String MODID = "WarpDrive";
|
||||
public static final String VERSION = "1.3.0.0";
|
||||
|
||||
|
||||
public static Block warpCore;
|
||||
public static Block protocolBlock;
|
||||
public static Block radarBlock;
|
||||
|
@ -147,469 +148,471 @@ public class WarpDrive implements LoadingCallback {
|
|||
public static Block transportBeaconBlock;
|
||||
public static Block chunkLoaderBlock;
|
||||
public static BlockDecorative decorativeBlock;
|
||||
|
||||
|
||||
public static Item reactorLaserFocusItem;
|
||||
public static ItemWarpComponent componentItem;
|
||||
public static ItemWarpUpgrade upgradeItem;
|
||||
|
||||
|
||||
public static ArmorMaterial armorMaterial = EnumHelper.addArmorMaterial("WARP", 5, new int[] { 1, 3, 2, 1 }, 15);
|
||||
public static ItemWarpArmor helmetItem;
|
||||
public static ItemWarpAirCanister airCanisterItem;
|
||||
|
||||
|
||||
public static BiomeGenBase spaceBiome;
|
||||
public World space;
|
||||
public SpaceWorldGenerator spaceWorldGenerator;
|
||||
public HyperSpaceWorldGenerator hyperSpaceWorldGenerator;
|
||||
public World hyperSpace;
|
||||
|
||||
|
||||
// Client settings
|
||||
public static float normalFOV = 70.0F;
|
||||
public static float normalSensitivity = 1.0F;
|
||||
|
||||
|
||||
public static CreativeTabs warpdriveTab = new WarpDriveCreativeTab("Warpdrive", "Warpdrive").setBackgroundImageName("warpdrive:creativeTab");
|
||||
|
||||
|
||||
@Instance(WarpDrive.MODID)
|
||||
public static WarpDrive instance;
|
||||
@SidedProxy(clientSide = "cr0s.warpdrive.client.ClientProxy", serverSide = "cr0s.warpdrive.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
|
||||
public static WarpCoresRegistry warpCores;
|
||||
public static JumpgatesRegistry jumpgates;
|
||||
public static CloakManager cloaks;
|
||||
|
||||
|
||||
public static CamRegistry cams;
|
||||
public boolean isOverlayEnabled = false;
|
||||
public int overlayType = 0;
|
||||
public String debugMessage = "";
|
||||
|
||||
|
||||
public static WarpDrivePeripheralHandler peripheralHandler = null;
|
||||
|
||||
|
||||
public static String defHelpStr = "help(\"functionName\"): returns help for the function specified";
|
||||
public static String defEnergyStr = "getEnergyLevel(): returns currently contained energy, max contained energy";
|
||||
public static String defUpgradeStr = "upgrades(): returns a list of currently installed upgrades";
|
||||
|
||||
|
||||
public static Logger logger;
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
WarpDriveConfig.preInit(new Configuration(event.getSuggestedConfigurationFile()));
|
||||
|
||||
|
||||
logger = event.getModLog();
|
||||
|
||||
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
|
||||
normalFOV = mc.gameSettings.fovSetting;
|
||||
normalSensitivity = mc.gameSettings.mouseSensitivity;
|
||||
logger.info("FOV is " + normalFOV + " Sensitivity is " + normalSensitivity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
// FIXME FMLInterModComms.sendMessage("Waila", "register", "cr0s.warpdrive.client.WailaHandler.callbackRegister");
|
||||
|
||||
|
||||
PacketHandler.init();
|
||||
}
|
||||
|
||||
|
||||
public static void debugPrint(String out) {
|
||||
if (WarpDriveConfig.G_DEBUGMODE) {
|
||||
logger.debug(out);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
WarpDriveConfig.load();
|
||||
|
||||
|
||||
// CORE CONTROLLER
|
||||
protocolBlock = new BlockProtocol(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(protocolBlock, "protocolBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityProtocol.class, "protocolBlock");
|
||||
|
||||
|
||||
// WARP CORE
|
||||
warpCore = new BlockReactor(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(warpCore, "warpCore");
|
||||
GameRegistry.registerTileEntity(TileEntityReactor.class, "warpCore");
|
||||
|
||||
|
||||
// WARP RADAR
|
||||
radarBlock = new BlockRadar(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(radarBlock, "radarBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityRadar.class, "radarBlock");
|
||||
|
||||
|
||||
// WARP ISOLATION
|
||||
isolationBlock = new BlockWarpIsolation(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(isolationBlock, "isolationBlock");
|
||||
|
||||
|
||||
// AIR GENERATOR
|
||||
airgenBlock = new BlockAirGenerator(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(airgenBlock, "airgenBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityAirGenerator.class, "airgenBlock");
|
||||
|
||||
|
||||
// AIR BLOCK
|
||||
airBlock = new BlockAir();
|
||||
|
||||
|
||||
GameRegistry.registerBlock(airBlock, "airBlock");
|
||||
|
||||
|
||||
// GAS BLOCK
|
||||
gasBlock = new BlockGas();
|
||||
|
||||
|
||||
GameRegistry.registerBlock(gasBlock, "gasBlock");
|
||||
|
||||
|
||||
// LASER EMITTER
|
||||
laserBlock = new BlockLaser(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(laserBlock, "laserBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityLaser.class, "laserBlock");
|
||||
|
||||
|
||||
// LASER EMITTER WITH CAMERA
|
||||
laserCamBlock = new BlockLaserCam(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(laserCamBlock, "laserCamBlock");
|
||||
|
||||
|
||||
// CAMERA
|
||||
cameraBlock = new BlockCamera(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(cameraBlock, "cameraBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityCamera.class, "cameraBlock");
|
||||
|
||||
|
||||
// MONITOR
|
||||
monitorBlock = new BlockMonitor();
|
||||
|
||||
|
||||
GameRegistry.registerBlock(monitorBlock, "monitorBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityMonitor.class, "monitorBlock");
|
||||
|
||||
|
||||
// MINING LASER
|
||||
miningLaserBlock = new BlockMiningLaser(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(miningLaserBlock, "miningLaserBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityMiningLaser.class, "miningLaserBlock");
|
||||
|
||||
|
||||
// LASER TREE FARM
|
||||
laserTreeFarmBlock = new BlockLaserTreeFarm(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(laserTreeFarmBlock, "laserTreeFarmBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityLaserTreeFarm.class, "laserTreeFarmBlock");
|
||||
|
||||
|
||||
// PARTICLE BOOSTER
|
||||
boosterBlock = new BlockParticleBooster(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(boosterBlock, "boosterBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityParticleBooster.class, "boosterBlock");
|
||||
|
||||
|
||||
// LASER LIFT
|
||||
liftBlock = new BlockLift(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(liftBlock, "liftBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityLift.class, "liftBlock");
|
||||
|
||||
|
||||
// IRIDIUM BLOCK
|
||||
iridiumBlock = new BlockIridium();
|
||||
|
||||
|
||||
GameRegistry.registerBlock(iridiumBlock, "iridiumBlock");
|
||||
|
||||
|
||||
// SHIP SCANNER
|
||||
scannerBlock = new BlockShipScanner(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(scannerBlock, "scannerBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityShipScanner.class, "scannerBlock");
|
||||
|
||||
|
||||
// CLOAKING DEVICE CORE
|
||||
cloakBlock = new BlockCloakingDeviceCore(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(cloakBlock, "cloakBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityCloakingDeviceCore.class, "cloakBlock");
|
||||
|
||||
|
||||
// CLOAKING DEVICE COIL
|
||||
cloakCoilBlock = new BlockCloakingCoil(0, Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(cloakCoilBlock, "cloakCoilBlock");
|
||||
|
||||
|
||||
// TRANSPORTER
|
||||
transporterBlock = new BlockTransporter(Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(transporterBlock, "transporter");
|
||||
GameRegistry.registerTileEntity(TileEntityTransporter.class, "transporter");
|
||||
|
||||
|
||||
// REACTOR MONITOR
|
||||
reactorMonitorBlock = new BlockLaserReactorMonitor(Material.rock);
|
||||
|
||||
|
||||
GameRegistry.registerBlock(reactorMonitorBlock, "reactorMonitor");
|
||||
GameRegistry.registerTileEntity(TileEntityLaserReactorMonitor.class, "reactorMonitor");
|
||||
|
||||
|
||||
// TRANSPORT BEACON
|
||||
transportBeaconBlock = new BlockTransportBeacon();
|
||||
|
||||
|
||||
GameRegistry.registerBlock(transportBeaconBlock, "transportBeacon");
|
||||
|
||||
|
||||
// POWER REACTOR, LASER, STORE
|
||||
powerReactorBlock = new BlockPowerReactor();
|
||||
GameRegistry.registerBlock(powerReactorBlock, "powerReactor");
|
||||
GameRegistry.registerTileEntity(TileEntityPowerReactor.class, "powerReactor");
|
||||
|
||||
|
||||
powerLaserBlock = new BlockPowerLaser();
|
||||
GameRegistry.registerBlock(powerLaserBlock, "powerLaser");
|
||||
GameRegistry.registerTileEntity(TileEntityPowerLaser.class, "powerLaser");
|
||||
|
||||
|
||||
powerStoreBlock = new BlockPowerStore();
|
||||
GameRegistry.registerBlock(powerStoreBlock, "powerStore");
|
||||
GameRegistry.registerTileEntity(TileEntityPowerStore.class, "powerStore");
|
||||
|
||||
|
||||
// CHUNK LOADER
|
||||
chunkLoaderBlock = new BlockChunkLoader();
|
||||
GameRegistry.registerBlock(chunkLoaderBlock, "chunkLoader");
|
||||
GameRegistry.registerTileEntity(TileEntityChunkLoader.class, "chunkLoader");
|
||||
|
||||
|
||||
// DECORATIVE
|
||||
decorativeBlock = new BlockDecorative();
|
||||
GameRegistry.registerBlock(decorativeBlock, ItemBlockDecorative.class, "decorative");
|
||||
|
||||
|
||||
// REACTOR LASER FOCUS
|
||||
reactorLaserFocusItem = new ItemReactorLaserFocus();
|
||||
GameRegistry.registerItem(reactorLaserFocusItem, "reactorLaserFocus");
|
||||
|
||||
|
||||
// COMPONENT ITEMS
|
||||
componentItem = new ItemWarpComponent();
|
||||
GameRegistry.registerItem(componentItem, "component");
|
||||
|
||||
|
||||
helmetItem = new ItemWarpArmor(armorMaterial, 0);
|
||||
GameRegistry.registerItem(helmetItem, "helmet");
|
||||
|
||||
|
||||
airCanisterItem = new ItemWarpAirCanister();
|
||||
GameRegistry.registerItem(airCanisterItem, "airCanisterFull");
|
||||
|
||||
|
||||
upgradeItem = new ItemWarpUpgrade();
|
||||
GameRegistry.registerItem(upgradeItem, "upgrade");
|
||||
|
||||
|
||||
proxy.registerEntities();
|
||||
ForgeChunkManager.setForcedChunkLoadingCallback(instance, instance);
|
||||
|
||||
|
||||
spaceWorldGenerator = new SpaceWorldGenerator();
|
||||
GameRegistry.registerWorldGenerator(spaceWorldGenerator, 0);
|
||||
hyperSpaceWorldGenerator = new HyperSpaceWorldGenerator();
|
||||
GameRegistry.registerWorldGenerator(hyperSpaceWorldGenerator, 0);
|
||||
|
||||
|
||||
registerSpaceDimension();
|
||||
registerHyperSpaceDimension();
|
||||
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new SpaceEventHandler());
|
||||
|
||||
|
||||
if (FMLCommonHandler.instance().getEffectiveSide().isClient()) {
|
||||
warpdriveTab.setBackgroundImageName("items.png");
|
||||
MinecraftForge.EVENT_BUS.register(new CameraOverlay(Minecraft.getMinecraft()));
|
||||
}
|
||||
|
||||
|
||||
if (WarpDriveConfig.isCCLoaded) {
|
||||
peripheralHandler = new WarpDrivePeripheralHandler();
|
||||
ComputerCraftAPI.registerPeripheralProvider(peripheralHandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
space = DimensionManager.getWorld(WarpDriveConfig.G_SPACE_DIMENSION_ID);
|
||||
hyperSpace = DimensionManager.getWorld(WarpDriveConfig.G_HYPERSPACE_DIMENSION_ID);
|
||||
|
||||
|
||||
WarpDriveConfig.postInit();
|
||||
|
||||
WarpDriveConfig.loadWorldGen();
|
||||
|
||||
if (WarpDriveConfig.isICLoaded && WarpDriveConfig.G_ENABLE_IC2_RECIPES) {
|
||||
initIC2Recipes();
|
||||
}
|
||||
if (WarpDriveConfig.G_ENABLE_VANILLA_RECIPES) {
|
||||
initVanillaRecipes();
|
||||
}
|
||||
|
||||
|
||||
warpCores = new WarpCoresRegistry();
|
||||
jumpgates = new JumpgatesRegistry();
|
||||
cams = new CamRegistry();
|
||||
}
|
||||
|
||||
|
||||
private static void initVanillaRecipes() {
|
||||
componentItem.registerRecipes();
|
||||
decorativeBlock.initRecipes();
|
||||
upgradeItem.initRecipes();
|
||||
|
||||
|
||||
// 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', Items.iron_ingot, 'c',
|
||||
componentItem.getIS(5), 'd', Items.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', 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', Items.iron_ingot, 'b', Blocks.iron_bars, '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', 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', 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', 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', 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', 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', Items.iron_ingot, 'n', Items.gold_nugget, 'g',
|
||||
Blocks.glass, 'c', componentItem.getIS(5)));
|
||||
|
||||
|
||||
// LaserCamera
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(laserCamBlock), cameraBlock, laserBlock));
|
||||
|
||||
|
||||
// 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', 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', 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', 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', 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', 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', 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', 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', Items.iron_ingot, 'w', Blocks.wool, 'g',
|
||||
Blocks.glass, 'c', componentItem.getIS(8)));
|
||||
}
|
||||
|
||||
|
||||
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(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(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', 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(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(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.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(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', Blocks.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(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(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(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");
|
||||
DimensionManager.registerProviderType(WarpDriveConfig.G_SPACE_PROVIDER_ID, SpaceProvider.class, true);
|
||||
DimensionManager.registerDimension(WarpDriveConfig.G_SPACE_DIMENSION_ID, WarpDriveConfig.G_SPACE_PROVIDER_ID);
|
||||
}
|
||||
|
||||
|
||||
private static void registerHyperSpaceDimension() {
|
||||
DimensionManager.registerProviderType(WarpDriveConfig.G_HYPERSPACE_PROVIDER_ID, HyperSpaceProvider.class, true);
|
||||
DimensionManager.registerDimension(WarpDriveConfig.G_HYPERSPACE_DIMENSION_ID, WarpDriveConfig.G_HYPERSPACE_PROVIDER_ID);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void serverLoad(FMLServerStartingEvent event) {
|
||||
cloaks = new CloakManager();
|
||||
MinecraftForge.EVENT_BUS.register(new CloakChunkWatcher());
|
||||
|
||||
|
||||
event.registerServerCommand(new GenerateCommand());
|
||||
event.registerServerCommand(new SpaceTpCommand());
|
||||
event.registerServerCommand(new InvisibleCommand());
|
||||
event.registerServerCommand(new JumpgateCommand());
|
||||
event.registerServerCommand(new DebugCommand());
|
||||
}
|
||||
|
||||
|
||||
public Ticket registerChunkLoadTE(WarpChunkTE te, boolean refreshLoading) {
|
||||
World worldObj = te.getWorldObj();
|
||||
if (ForgeChunkManager.ticketCountAvailableFor(this, worldObj) > 0) {
|
||||
|
@ -627,15 +630,15 @@ public class WarpDrive implements LoadingCallback {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public Ticket registerChunkLoadTE(WarpChunkTE te) {
|
||||
return registerChunkLoadTE(te, true);
|
||||
}
|
||||
|
||||
|
||||
public Ticket getTicket(WarpChunkTE te) {
|
||||
return registerChunkLoadTE(te, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void ticketsLoaded(List<Ticket> tickets, World world) {
|
||||
for (Ticket ticket : tickets) {
|
||||
|
@ -660,7 +663,7 @@ public class WarpDrive implements LoadingCallback {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ForgeChunkManager.releaseTicket(ticket);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ import cr0s.warpdrive.data.TransitionPlane;
|
|||
|
||||
public class WarpDriveConfig {
|
||||
private static Configuration config;
|
||||
|
||||
|
||||
/*
|
||||
* The variables which store whether or not individual mods are loaded
|
||||
*/
|
||||
|
@ -36,19 +36,19 @@ public class WarpDriveConfig {
|
|||
public static boolean isThermalExpansionLoaded = false;
|
||||
public static boolean isAdvancedRepulsionSystemsLoaded = false;
|
||||
public static boolean isMagicalCropsLoaded = false;
|
||||
|
||||
|
||||
// ForgeMultipart (microblocks) support
|
||||
public static Method forgeMultipart_helper_createTileFromNBT = null;
|
||||
public static Method forgeMultipart_helper_sendDescPacket = null;
|
||||
public static Method forgeMultipart_tileMultipart_onChunkLoad = null;
|
||||
|
||||
|
||||
public static ItemStack IC2_Air;
|
||||
public static ItemStack IC2_Empty;
|
||||
public static ItemStack IC2_RubberWood;
|
||||
public static ItemStack IC2_Resin;
|
||||
public static Item IC2_fluidCell;
|
||||
public static Block CC_Computer, CC_peripheral, CCT_Turtle, CCT_Upgraded, CCT_Advanced;
|
||||
|
||||
|
||||
public static Item CC_Floppy;
|
||||
public static ItemStack GT_Ores, GT_Granite, GT_Machine;
|
||||
public static ItemStack IC2_solarPanel;
|
||||
|
@ -56,11 +56,11 @@ public class WarpDriveConfig {
|
|||
public static int ICBM_Machine, ICBM_Missile, ICBM_Explosive;
|
||||
public static Item GS_ultimateLappack;
|
||||
public static ArrayList<Block> forceFieldBlocks;
|
||||
|
||||
|
||||
public static ArrayList<Block> minerOres, minerLogs, minerLeaves, scannerIgnoreBlocks;
|
||||
public static ArrayList<Item> spaceHelmets, jetpacks;
|
||||
public static ArrayList<Block> commonWorldGenOres;
|
||||
|
||||
|
||||
// Mod configuration (see loadWarpDriveConfig() for comments/definitions)
|
||||
// General
|
||||
public static int G_SPACE_PROVIDER_ID = 14;
|
||||
|
@ -75,14 +75,14 @@ public class WarpDriveConfig {
|
|||
public static boolean G_DEBUGMODE = false;
|
||||
public static String G_SCHEMALOCATION = "warpDrive_schematics";
|
||||
public static int G_BLOCKS_PER_TICK = 3500;
|
||||
|
||||
|
||||
public static boolean G_ENABLE_IC2_RECIPES = true;
|
||||
public static boolean G_ENABLE_VANILLA_RECIPES = false;
|
||||
public static boolean G_ENABLE_TDK_RECIPES = false;
|
||||
|
||||
|
||||
// Transition planes
|
||||
public static TransitionPlane[] G_TRANSITIONPLANES = null;
|
||||
|
||||
|
||||
// Warp Drive Core
|
||||
public static int WC_MAX_ENERGY_VALUE = 100000000;
|
||||
public static int WC_ENERGY_PER_BLOCK_MODE1 = 10;
|
||||
|
@ -102,7 +102,7 @@ public class WarpDriveConfig {
|
|||
public static int WC_CORES_REGISTRY_UPDATE_INTERVAL_SECONDS = 10;
|
||||
public static int WC_ISOLATION_UPDATE_INTERVAL_SECONDS = 10;
|
||||
public static String[] WC_UNLIMITED_PLAYERNAMES = { "notch", "someone" };
|
||||
|
||||
|
||||
// Warp Radar
|
||||
public static int WR_MAX_ENERGY_VALUE = 100000000; // 100kk eU
|
||||
public static int WR_MAX_ISOLATION_RANGE = 2;
|
||||
|
@ -110,23 +110,23 @@ public class WarpDriveConfig {
|
|||
public static int WR_MAX_ISOLATION_BLOCKS = 132;
|
||||
public static double WR_MIN_ISOLATION_EFFECT = 0.12;
|
||||
public static double WR_MAX_ISOLATION_EFFECT = 1.00;
|
||||
|
||||
|
||||
// Ship Scanner
|
||||
public static int SS_MAX_ENERGY_VALUE = 500000000;
|
||||
public static int SS_EU_PER_BLOCK_SCAN = 100; // eU per block of ship volume
|
||||
// (including air)
|
||||
public static int SS_EU_PER_BLOCK_DEPLOY = 5000;
|
||||
public static int SS_MAX_DEPLOY_RADIUS_BLOCKS = 50;
|
||||
|
||||
|
||||
// Particle Booster
|
||||
public static int PB_MAX_ENERGY_VALUE = 100000;
|
||||
|
||||
|
||||
// Laser Emitter
|
||||
public static int LE_MAX_BOOSTERS_NUMBER = 10;
|
||||
public static int LE_MAX_LASER_ENERGY = 4000000;
|
||||
public static int LE_EMIT_DELAY_TICKS = 20 * 3;
|
||||
public static int LE_EMIT_SCAN_DELAY_TICKS = 10;
|
||||
|
||||
|
||||
public static double LE_COLLECT_ENERGY_MULTIPLIER = 0.60D;
|
||||
public static int LE_BEAM_LENGTH_PER_ENERGY_DIVIDER = 5000;
|
||||
public static int LE_ENTITY_HIT_SET_ON_FIRE_TIME = 100;
|
||||
|
@ -135,7 +135,7 @@ public class WarpDriveConfig {
|
|||
public static int LE_BLOCK_HIT_CONSUME_ENERGY = 70000;
|
||||
public static int LE_BLOCK_HIT_CONSUME_ENERGY_PER_BLOCK_RESISTANCE = 1000;
|
||||
public static int LE_BLOCK_HIT_CONSUME_ENERGY_PER_DISTANCE = 10;
|
||||
|
||||
|
||||
// Mining Laser
|
||||
// BuildCraft quarry values for reference
|
||||
// - harvesting one block is 60 MJ/block = 600 RF/block = ~145 EU/block
|
||||
|
@ -172,57 +172,57 @@ public class WarpDriveConfig {
|
|||
public static double ML_DEUTERIUM_MUL_SILKTOUCH = 1.0;
|
||||
public static double ML_EU_MUL_FORTUNE = 2.5;
|
||||
public static int ML_MAX_RADIUS = 5;
|
||||
|
||||
|
||||
// Tree farm
|
||||
public static int TF_MAX_SIZE = 16;
|
||||
|
||||
|
||||
// Cloaking device core
|
||||
public static int CD_MAX_CLOAKING_FIELD_SIDE = 100;
|
||||
public static int CD_ENERGY_PER_BLOCK_TIER1 = 125;
|
||||
public static int CD_ENERGY_PER_BLOCK_TIER2 = 500;
|
||||
public static int CD_FIELD_REFRESH_INTERVAL_SECONDS = 3;
|
||||
public static int CD_COIL_CAPTURE_BLOCKS = 5;
|
||||
|
||||
|
||||
// Air generator
|
||||
public static int AG_RF_PER_CANISTER = 20;
|
||||
|
||||
|
||||
// Reactor monitor
|
||||
public static int RM_MAX_ENERGY = 1000000;
|
||||
public static double RM_EU_PER_HEAT = 2;
|
||||
|
||||
|
||||
// Transporter
|
||||
public static int TR_MAX_ENERGY = 1000000;
|
||||
public static boolean TR_RELATIVE_COORDS = true;
|
||||
public static double TR_EU_PER_METRE = 100.0;
|
||||
// public static double TR_MAX_SCAN_RANGE = 4; FIXME: not used ?!?
|
||||
public static double TR_MAX_BOOST_MUL = 4.0;
|
||||
|
||||
|
||||
// Power reactor
|
||||
public static int PR_MAX_ENERGY = 100000000;
|
||||
public static int PR_TICK_TIME = 5;
|
||||
public static int PR_MAX_LASERS = 6;
|
||||
|
||||
|
||||
// Power store
|
||||
public static int PS_MAX_ENERGY = 1000000;
|
||||
|
||||
|
||||
// Laser Lift
|
||||
public static int LL_MAX_ENERGY = 2400;
|
||||
public static int LL_LIFT_ENERGY = 800;
|
||||
public static int LL_TICK_RATE = 10;
|
||||
|
||||
|
||||
// Chunk Loader
|
||||
public static int CL_MAX_ENERGY = 1000000;
|
||||
public static int CL_MAX_DISTANCE = 2;
|
||||
public static int CL_RF_PER_CHUNKTICK = 320;
|
||||
|
||||
|
||||
public static ItemStack getIC2Item(String id) {
|
||||
return new ItemStack((Item) Item.itemRegistry.getObject("IC2:" + id));
|
||||
}
|
||||
|
||||
|
||||
public static void preInit(Configuration configIn) {
|
||||
config = configIn;
|
||||
}
|
||||
|
||||
|
||||
public static void loadWarpDriveConfig() {
|
||||
// General
|
||||
G_SPACE_PROVIDER_ID = config.get("General", "space_provider_id", G_SPACE_PROVIDER_ID, "Space dimension provider ID").getInt();
|
||||
|
@ -240,7 +240,7 @@ public class WarpDriveConfig {
|
|||
G_BLOCKS_PER_TICK = config.get("General", "blocks_per_tick", G_BLOCKS_PER_TICK,
|
||||
"Number of blocks to move per ticks, too high will cause lag spikes on ship jumping or deployment, too low may break the ship wirings")
|
||||
.getInt();
|
||||
|
||||
|
||||
G_ENABLE_IC2_RECIPES = config.get("General", "enable_ic2_recipes", G_ENABLE_IC2_RECIPES, "Original recipes based on IndustrialCrat2 by Cr0s")
|
||||
.getBoolean(true);
|
||||
G_ENABLE_VANILLA_RECIPES = config.get("General", "enable_vanilla_recipes", G_ENABLE_VANILLA_RECIPES, "Vanilla recipes by DarkholmeTenk").getBoolean(
|
||||
|
@ -251,7 +251,7 @@ public class WarpDriveConfig {
|
|||
G_ENABLE_TDK_RECIPES,
|
||||
"Mixed recipes for TDK packs by Lem'ADEC (currently requires at least AppliedEnergistics, Extracells, AtomicScience, IndustrialCraft2, GraviSuite and ThermalExpansion")
|
||||
.getBoolean(false);
|
||||
|
||||
|
||||
// TransitionPlane
|
||||
config.addCustomCategoryComment("TransitionPlane",
|
||||
"Transition planes defines which region in space allows to go to other dimensions, default is overworld with 100k radius.\n"
|
||||
|
@ -278,7 +278,7 @@ public class WarpDriveConfig {
|
|||
}
|
||||
// FIXME: check transition planes aren't overlapping
|
||||
// FIXME: check transition planes have valid dimension id
|
||||
|
||||
|
||||
// Warp Core
|
||||
WC_MAX_ENERGY_VALUE = config.get("WarpCore", "max_energy_value", WC_MAX_ENERGY_VALUE, "Maximum energy storage").getInt();
|
||||
WC_ENERGY_PER_BLOCK_MODE1 = config.get("WarpCore", "energy_per_block_mode1", WC_ENERGY_PER_BLOCK_MODE1).getInt();
|
||||
|
@ -300,14 +300,14 @@ public class WarpDriveConfig {
|
|||
.getInt();
|
||||
WC_WARMUP_LONGJUMP_SECONDS = config.get("WarpCore", "warmup_longjump_seconds", WC_WARMUP_LONGJUMP_SECONDS, "Long jump means more than 50 blocks")
|
||||
.getInt();
|
||||
|
||||
|
||||
WC_CORES_REGISTRY_UPDATE_INTERVAL_SECONDS = config.get("WarpCore", "cores_registry_update_interval", WC_CORES_REGISTRY_UPDATE_INTERVAL_SECONDS,
|
||||
"(measured in seconds)").getInt();
|
||||
WC_ISOLATION_UPDATE_INTERVAL_SECONDS = config.get("WarpCore", "isolation_update_interval", WC_ISOLATION_UPDATE_INTERVAL_SECONDS,
|
||||
"(measured in seconds)").getInt();
|
||||
WC_UNLIMITED_PLAYERNAMES = config.get("WarpCore", "unlimited_playernames", WC_UNLIMITED_PLAYERNAMES,
|
||||
"List of player names which gives unlimited block counts to their ship").getStringList();
|
||||
|
||||
|
||||
// Warp Radar
|
||||
WR_MAX_ENERGY_VALUE = config.get("WarpRadar", "max_energy_value", WR_MAX_ENERGY_VALUE).getInt();
|
||||
WR_MAX_ISOLATION_RANGE = config.get("WarpRadar", "max_isolation_range", WR_MAX_ISOLATION_RANGE,
|
||||
|
@ -325,7 +325,7 @@ public class WarpDriveConfig {
|
|||
WR_MAX_ISOLATION_EFFECT = config.get("WarpRadar", "max_isolation_effect", WR_MAX_ISOLATION_EFFECT,
|
||||
"isolation effect achieved with max number of isolation blocks (0.01 to 1.00)").getDouble(1.00D);
|
||||
WR_MAX_ISOLATION_EFFECT = Math.min(1.0D, Math.max(WR_MAX_ISOLATION_EFFECT, 0.01D));
|
||||
|
||||
|
||||
// Ship Scanner
|
||||
SS_MAX_ENERGY_VALUE = config.get("WarpCore", "max_energy_value", SS_MAX_ENERGY_VALUE, "Maximum energy storage").getInt();
|
||||
SS_EU_PER_BLOCK_SCAN = config.get("ShipScanner", "energy_per_block_when_scanning", SS_EU_PER_BLOCK_SCAN,
|
||||
|
@ -340,16 +340,16 @@ public class WarpDriveConfig {
|
|||
}
|
||||
SS_MAX_DEPLOY_RADIUS_BLOCKS = config.get("ShipScanner", "max_deploy_radius_blocks", SS_MAX_DEPLOY_RADIUS_BLOCKS,
|
||||
"Max distance from ship scanner to ship core, measured in blocks").getInt();
|
||||
|
||||
|
||||
// Particle Booster
|
||||
PB_MAX_ENERGY_VALUE = config.get("ParticleBooster", "max_energy_value", PB_MAX_ENERGY_VALUE).getInt();
|
||||
|
||||
|
||||
// Laser Emitter
|
||||
LE_MAX_BOOSTERS_NUMBER = config.get("LaserEmitter", "max_boosters_number", LE_MAX_BOOSTERS_NUMBER).getInt();
|
||||
LE_MAX_LASER_ENERGY = config.get("LaserEmitter", "max_laser_energy", LE_MAX_LASER_ENERGY).getInt();
|
||||
LE_EMIT_DELAY_TICKS = config.get("LaserEmitter", "emit_delay_ticks", LE_EMIT_DELAY_TICKS).getInt();
|
||||
LE_EMIT_SCAN_DELAY_TICKS = config.get("LaserEmitter", "emit_scan_delay_ticks", LE_EMIT_SCAN_DELAY_TICKS).getInt();
|
||||
|
||||
|
||||
// Laser Emitter tweaks
|
||||
LE_COLLECT_ENERGY_MULTIPLIER = config.get("LaserEmitterTweaks", "collect_energy_multiplier", LE_COLLECT_ENERGY_MULTIPLIER).getDouble(0.6D);
|
||||
LE_BEAM_LENGTH_PER_ENERGY_DIVIDER = config.get("LaserEmitterTweaks", "beam_length_per_energy_divider", LE_BEAM_LENGTH_PER_ENERGY_DIVIDER).getInt();
|
||||
|
@ -363,7 +363,7 @@ public class WarpDriveConfig {
|
|||
LE_BLOCK_HIT_CONSUME_ENERGY_PER_BLOCK_RESISTANCE).getInt();
|
||||
LE_BLOCK_HIT_CONSUME_ENERGY_PER_DISTANCE = config.get("LaserEmitterTweaks", "block_hit_consume_energy_per_distance",
|
||||
LE_BLOCK_HIT_CONSUME_ENERGY_PER_DISTANCE).getInt();
|
||||
|
||||
|
||||
// Mining Laser
|
||||
ML_MAX_BOOSTERS_NUMBER = config.get("MiningLaser", "max_boosters_number", ML_MAX_BOOSTERS_NUMBER).getInt();
|
||||
ML_WARMUP_DELAY_TICKS = config.get("MiningLaser", "warmup_delay_ticks", ML_WARMUP_DELAY_TICKS).getInt();
|
||||
|
@ -378,10 +378,10 @@ public class WarpDriveConfig {
|
|||
ML_DEUTERIUM_MUL_SILKTOUCH = config.get("MiningLaser", "silktouch_deuterium_mul", ML_DEUTERIUM_MUL_SILKTOUCH).getDouble(1.0);
|
||||
ML_EU_MUL_FORTUNE = config.get("MiningLaser", "fortune_power_base", ML_EU_MUL_FORTUNE).getDouble(2.5);
|
||||
ML_MAX_RADIUS = config.get("MiningLaser", "max_radius", ML_MAX_RADIUS).getInt();
|
||||
|
||||
|
||||
// Tree Farm
|
||||
TF_MAX_SIZE = config.get("TreeFarm", "max_treefarm_size", TF_MAX_SIZE).getInt();
|
||||
|
||||
|
||||
// Cloaking device core
|
||||
CD_MAX_CLOAKING_FIELD_SIDE = config.get("CloakingDevice", "max_cloaking_field_side", CD_MAX_CLOAKING_FIELD_SIDE).getInt();
|
||||
CD_ENERGY_PER_BLOCK_TIER1 = config.get("CloakingDevice", "energy_per_block_tier1", CD_ENERGY_PER_BLOCK_TIER1).getInt();
|
||||
|
@ -389,34 +389,34 @@ public class WarpDriveConfig {
|
|||
CD_FIELD_REFRESH_INTERVAL_SECONDS = config.get("CloakingDevice", "field_refresh_interval_seconds", CD_FIELD_REFRESH_INTERVAL_SECONDS).getInt();
|
||||
CD_COIL_CAPTURE_BLOCKS = config.get("CloakingDevice", "coil_capture_blocks", CD_COIL_CAPTURE_BLOCKS, "Extra blocks covered after the outer coils")
|
||||
.getInt();
|
||||
|
||||
|
||||
// Air generator
|
||||
AG_RF_PER_CANISTER = config.get("Air Generator", "energy_per_canister", AG_RF_PER_CANISTER).getInt();
|
||||
|
||||
|
||||
// Reactor monitor
|
||||
RM_MAX_ENERGY = config.get("Reactor Monitor", "max_rm_energy", RM_MAX_ENERGY).getInt();
|
||||
RM_EU_PER_HEAT = config.get("Reactor Monitor", "eu_per_heat", RM_EU_PER_HEAT).getDouble(2);
|
||||
|
||||
|
||||
// Transporter
|
||||
TR_MAX_ENERGY = config.get("Transporter", "max_energy", TR_MAX_ENERGY).getInt();
|
||||
TR_RELATIVE_COORDS = config.get("Transporter", "relative_coords", TR_RELATIVE_COORDS).getBoolean(true);
|
||||
TR_EU_PER_METRE = config.get("Transporter", "eu_per_ent_per_metre", TR_EU_PER_METRE).getDouble(100.0);
|
||||
TR_MAX_BOOST_MUL = config.get("Transporter", "max_boost", TR_MAX_BOOST_MUL).getDouble(4.0);
|
||||
|
||||
|
||||
// Power reactor
|
||||
PR_MAX_ENERGY = config.get("Reactor", "max_energy", PR_MAX_ENERGY).getInt();
|
||||
PR_TICK_TIME = config.get("Reactor", "ticks_per_update", PR_TICK_TIME).getInt();
|
||||
PR_MAX_LASERS = config.get("Reactor", "max_lasers", PR_MAX_LASERS).getInt();
|
||||
|
||||
|
||||
// Power store
|
||||
PS_MAX_ENERGY = config.get("PowerStore", "max_energy", PS_MAX_ENERGY).getInt();
|
||||
|
||||
|
||||
// Laser lift
|
||||
LL_MAX_ENERGY = config.get("LaserLift", "max_energy", LL_MAX_ENERGY).getInt();
|
||||
LL_LIFT_ENERGY = config.get("LaserLift", "lift_energy", LL_LIFT_ENERGY, "Energy consummed per entity moved").getInt();
|
||||
LL_TICK_RATE = config.get("LaserLift", "tick_rate", LL_TICK_RATE).getInt();
|
||||
}
|
||||
|
||||
|
||||
public static void load() {
|
||||
commonWorldGenOres = new ArrayList<Block>();
|
||||
commonWorldGenOres.add(Blocks.iron_ore);
|
||||
|
@ -425,9 +425,9 @@ public class WarpDriveConfig {
|
|||
commonWorldGenOres.add(Blocks.emerald_ore);
|
||||
commonWorldGenOres.add(Blocks.lapis_ore);
|
||||
commonWorldGenOres.add(Blocks.redstone_ore);
|
||||
|
||||
|
||||
forceFieldBlocks = new ArrayList<Block>();
|
||||
|
||||
|
||||
spaceHelmets = new ArrayList<Item>();
|
||||
jetpacks = new ArrayList<Item>();
|
||||
minerOres = new ArrayList<Block>();
|
||||
|
@ -435,51 +435,51 @@ public class WarpDriveConfig {
|
|||
minerLeaves = new ArrayList<Block>();
|
||||
scannerIgnoreBlocks = new ArrayList<Block>();
|
||||
config.load();
|
||||
|
||||
|
||||
isForgeMultipartLoaded = Loader.isModLoaded("ForgeMultipart");
|
||||
if (isForgeMultipartLoaded) {
|
||||
loadForgeMultipart();
|
||||
}
|
||||
|
||||
|
||||
isICLoaded = Loader.isModLoaded("IC2");
|
||||
if (isICLoaded)
|
||||
loadIC2();
|
||||
|
||||
|
||||
isCCLoaded = Loader.isModLoaded("ComputerCraft");
|
||||
if (isCCLoaded)
|
||||
loadCC();
|
||||
|
||||
|
||||
isAdvSolPanelLoaded = Loader.isModLoaded("AdvancedSolarPanel");
|
||||
if (isAdvSolPanelLoaded)
|
||||
loadASP();
|
||||
|
||||
|
||||
isAtomicScienceLoaded = Loader.isModLoaded("ResonantInduction|Atomic");
|
||||
if (isAtomicScienceLoaded)
|
||||
loadAtomicScience();
|
||||
|
||||
|
||||
isICBMLoaded = Loader.isModLoaded("ICBM|Explosion");
|
||||
if (isICBMLoaded)
|
||||
loadICBM();
|
||||
|
||||
|
||||
isMFFSLoaded = Loader.isModLoaded("MFFS");
|
||||
if (isMFFSLoaded)
|
||||
loadMFFS();
|
||||
|
||||
|
||||
isGraviSuiteLoaded = Loader.isModLoaded("GraviSuite");
|
||||
if (isGraviSuiteLoaded)
|
||||
loadGraviSuite();
|
||||
|
||||
|
||||
isNetherOresLoaded = Loader.isModLoaded("NetherOres");
|
||||
|
||||
|
||||
isThermalExpansionLoaded = Loader.isModLoaded("ThermalExpansion");
|
||||
if (isThermalExpansionLoaded)
|
||||
loadThermalExpansion();
|
||||
|
||||
|
||||
isAdvancedRepulsionSystemsLoaded = Loader.isModLoaded("AdvancedRepulsionSystems");
|
||||
if (isAdvancedRepulsionSystemsLoaded) {
|
||||
loadAdvancedRepulsionSystems();
|
||||
}
|
||||
|
||||
|
||||
isMagicalCropsLoaded = Loader.isModLoaded("MagicalCrops");
|
||||
//
|
||||
minerOres.add(WarpDrive.iridiumBlock);
|
||||
|
@ -491,13 +491,13 @@ public class WarpDriveConfig {
|
|||
minerOres.add(Blocks.torch);
|
||||
minerOres.add(Blocks.glowstone);
|
||||
minerOres.add(Blocks.redstone_block);
|
||||
|
||||
|
||||
// Ignore WarpDrive blocks (which potentially will be duplicated by
|
||||
// cheaters using ship scan/deploy)
|
||||
scannerIgnoreBlocks.add(WarpDrive.warpCore);
|
||||
scannerIgnoreBlocks.add(WarpDrive.protocolBlock);
|
||||
scannerIgnoreBlocks.add(WarpDrive.iridiumBlock);
|
||||
|
||||
|
||||
if (isICLoaded) {
|
||||
scannerIgnoreBlocks.add(Block.getBlockFromName("IC2:mfsUnit"));
|
||||
scannerIgnoreBlocks.add(Block.getBlockFromName("IC2:mfeUnit"));
|
||||
|
@ -517,15 +517,15 @@ public class WarpDriveConfig {
|
|||
for (Block t : commonWorldGenOres) {
|
||||
scannerIgnoreBlocks.add(t);
|
||||
}
|
||||
|
||||
|
||||
loadWarpDriveConfig();
|
||||
config.save();
|
||||
}
|
||||
|
||||
|
||||
public static void postInit() {
|
||||
LoadOreDict();
|
||||
}
|
||||
|
||||
|
||||
private static void LoadOreDict() {
|
||||
String[] oreNames = OreDictionary.getOreNames();
|
||||
for (String oreName : oreNames) {
|
||||
|
@ -553,7 +553,7 @@ public class WarpDriveConfig {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadForgeMultipart() {
|
||||
try {//TODO: Update to 1.7
|
||||
Class forgeMultipart_helper = Class.forName("codechicken.multipart.MultipartHelper");
|
||||
|
@ -567,7 +567,7 @@ public class WarpDriveConfig {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadIC2() {
|
||||
IC2_solarPanel = getIC2Item("solarPanel");
|
||||
spaceHelmets.add(getIC2Item("hazmatHelmet").getItem());
|
||||
|
@ -593,14 +593,14 @@ public class WarpDriveConfig {
|
|||
ore = getIC2Item("leadOre");
|
||||
if (ore != null)
|
||||
commonWorldGenOres.add(Block.getBlockFromItem(ore.getItem()));
|
||||
|
||||
|
||||
minerOres.add(Block.getBlockFromItem(getIC2Item("rubberWood").getItem()));
|
||||
IC2_fluidCell = getIC2Item("FluidCell").getItem();
|
||||
}
|
||||
|
||||
|
||||
private static void loadCC() {
|
||||
try {
|
||||
/*
|
||||
/*
|
||||
CC_Computer = ComputerCraft.Blocks.computer;
|
||||
CC_peripheral = ComputerCraft.Blocks.peripheral;
|
||||
CC_Floppy = ComputerCraft.Items.disk;
|
||||
|
@ -613,7 +613,7 @@ public class WarpDriveConfig {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadASP() {
|
||||
try {
|
||||
spaceHelmets.add((Item) Item.itemRegistry.getObject("AdvancedSolarPanel:advanced_solar_helmet"));
|
||||
|
@ -625,7 +625,7 @@ public class WarpDriveConfig {
|
|||
isAdvSolPanelLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadAtomicScience() {
|
||||
try {
|
||||
/* TODO: Does not exist for 1.7
|
||||
|
@ -640,7 +640,7 @@ public class WarpDriveConfig {
|
|||
isAtomicScienceLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadICBM() {
|
||||
try {
|
||||
/* TODO: Does not exist yet for 1.7
|
||||
|
@ -658,7 +658,7 @@ public class WarpDriveConfig {
|
|||
isICBMLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadMFFS() {
|
||||
try {
|
||||
forceFieldBlocks.add(Block.getBlockFromName("MFFS:FIXME_field")); // FIXME
|
||||
|
@ -669,10 +669,10 @@ public class WarpDriveConfig {
|
|||
isMFFSLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadGraviSuite() {
|
||||
try {
|
||||
|
||||
|
||||
spaceHelmets.add((Item) Item.itemRegistry.getObject("GraviSuite.ultimateSolarHelmet")); // FIXME
|
||||
jetpacks.add((Item) Item.itemRegistry.getObject("GraviSuite.advJetpack")); // FIXME
|
||||
jetpacks.add((Item) Item.itemRegistry.getObject("GraviSuite.graviChestPlate")); // FIXME
|
||||
|
@ -683,7 +683,7 @@ public class WarpDriveConfig {
|
|||
isGraviSuiteLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadThermalExpansion() {
|
||||
try {
|
||||
// TEEnergyCell =
|
||||
|
@ -695,10 +695,10 @@ public class WarpDriveConfig {
|
|||
isThermalExpansionLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void loadAdvancedRepulsionSystems() {
|
||||
try {
|
||||
|
||||
|
||||
forceFieldBlocks.add(Block.getBlockFromName("AdvancedRepulsionSystems:field"));
|
||||
} catch (Exception e) {
|
||||
WarpDrive.logger.error("WarpDriveConfig Error loading AdvancedRepulsionSystems classes");
|
||||
|
@ -706,7 +706,7 @@ public class WarpDriveConfig {
|
|||
isAdvancedRepulsionSystemsLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Block getDefaultSurfaceBlock(Random random, boolean corrupted, boolean isMoon) {
|
||||
if (isMoon) {
|
||||
if (random.nextInt(5) == 1) {
|
||||
|
@ -726,7 +726,7 @@ public class WarpDriveConfig {
|
|||
}
|
||||
return Blocks.stone;
|
||||
}
|
||||
|
||||
|
||||
public static Block getRandomSurfaceBlock(Random random, Block def, boolean bedrock) {
|
||||
if (bedrock && (random.nextInt(1000) == 1)) {
|
||||
return Blocks.bedrock;
|
||||
|
@ -737,7 +737,7 @@ public class WarpDriveConfig {
|
|||
}
|
||||
return getRandomOverworldBlock(random, def);
|
||||
}
|
||||
|
||||
|
||||
public static Block getRandomOverworldBlock(Random random, Block def) {
|
||||
if (random.nextInt(25) == 5) {
|
||||
return commonWorldGenOres.get(random.nextInt(commonWorldGenOres.size()));
|
||||
|
@ -748,7 +748,7 @@ public class WarpDriveConfig {
|
|||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
|
||||
public static Block getRandomNetherBlock(Random random, Block def) {
|
||||
if (isICLoaded && (random.nextInt(10000) == 42)) {
|
||||
return WarpDrive.iridiumBlock;
|
||||
|
@ -758,7 +758,7 @@ public class WarpDriveConfig {
|
|||
return commonWorldGenOres.get(random.nextInt(commonWorldGenOres.size()));
|
||||
return def;
|
||||
}
|
||||
|
||||
|
||||
public static Block getRandomEndBlock(Random random, Block def) {
|
||||
if (isICLoaded && random.nextInt(10000) == 42) {
|
||||
return WarpDrive.iridiumBlock;
|
||||
|
@ -767,4 +767,8 @@ public class WarpDriveConfig {
|
|||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
public static void loadWorldGen() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue