Merge pull request #56 from YuRaNnNzZZ/MC1.7

Various additions
This commit is contained in:
Francescco Macagno 2015-08-14 15:54:52 -07:00
commit 71afe5b86f
9 changed files with 500 additions and 17 deletions

View file

@ -31,11 +31,13 @@ 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.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
@ -84,6 +86,7 @@ import cr0s.warpdrive.block.movement.TileEntityTransporter;
import cr0s.warpdrive.block.passive.BlockAir;
import cr0s.warpdrive.block.passive.BlockDecorative;
import cr0s.warpdrive.block.passive.BlockGas;
import cr0s.warpdrive.block.passive.BlockHiAdvMachine;
import cr0s.warpdrive.block.passive.BlockIridium;
import cr0s.warpdrive.block.passive.BlockTransportBeacon;
import cr0s.warpdrive.block.passive.ItemBlockDecorative;
@ -145,6 +148,7 @@ public class WarpDrive implements LoadingCallback {
public static Block blockAir;
public static Block blockGas;
public static Block blockIridium;
public static Block blockHiAdvMachine;
public static Block blockTransportBeacon;
public static Block blockChunkLoader;
public static BlockDecorative blockDecorative;
@ -164,7 +168,9 @@ public class WarpDrive implements LoadingCallback {
public World hyperSpace;
// Client settings
public static float camFOV = 70.0F;
public static float normalFOV = 70.0F;
public static float camSensitivity = 0.5F;
public static float normalSensitivity = 1.0F;
public static CreativeTabs creativeTabWarpDrive = new CreativeTabWarpDrive("Warpdrive", "Warpdrive").setBackgroundImageName("warpdrive:creativeTab");
@ -197,19 +203,19 @@ public class WarpDrive implements LoadingCallback {
logger = event.getModLog();
// Not needed as we register this at right click on the monitor.
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();
}
@ -308,6 +314,13 @@ public class WarpDrive implements LoadingCallback {
GameRegistry.registerBlock(blockIridium, "blockIridium");
// HIGHLY ADVANCED MACHINE BLOCK
if (WarpDriveConfig.isIndustrialCraft2loaded) {
blockHiAdvMachine = new BlockHiAdvMachine();
GameRegistry.registerBlock(blockHiAdvMachine, "blockHAMachine");
}
// SHIP SCANNER
blockShipScanner = new BlockShipScanner(0, Material.rock);
@ -420,6 +433,9 @@ public class WarpDrive implements LoadingCallback {
if (WarpDriveConfig.isIndustrialCraft2loaded && WarpDriveConfig.G_ENABLE_IC2_RECIPES) {
initIC2Recipes();
}
if (WarpDriveConfig.isIndustrialCraft2loaded && WarpDriveConfig.G_ENABLE_HARD_IC2_RECIPES) {
initHardIC2Recipes();
}
if (WarpDriveConfig.G_ENABLE_VANILLA_RECIPES) {
initVanillaRecipes();
}
@ -711,6 +727,165 @@ public class WarpDrive implements LoadingCallback {
'a', WarpDriveConfig.getIC2Item("itemPartAlloy"));
}
private static void initHardIC2Recipes() {
ItemStack advancedAlloy = WarpDriveConfig.getModItem("IC2", "itemPartAlloy", -1).copy();
ItemStack iridiumAlloy = WarpDriveConfig.getModItem("IC2", "itemPartIridium", -1).copy();
ItemStack advancedMachine = WarpDriveConfig.getModItem("IC2", "blockMachine", 12).copy();
ItemStack miner = WarpDriveConfig.getModItem("IC2", "blockMachine", 7).copy();
ItemStack magnetizer = WarpDriveConfig.getModItem("IC2", "blockMachine", 9).copy();
ItemStack fiberGlassCable = WarpDriveConfig.getModItem("IC2", "itemCable", 9).copy();
ItemStack circuit = WarpDriveConfig.getModItem("IC2", "itemPartCircuit", -1).copy();
ItemStack advCircuit = WarpDriveConfig.getModItem("IC2", "itemPartCircuitAdv", -1).copy();
ItemStack ironPlate = WarpDriveConfig.getModItem("IC2", "itemPlates", 4).copy();
ItemStack mfe = WarpDriveConfig.getModItem("IC2", "blockElectric", 1).copy();
ItemStack mfsu = WarpDriveConfig.getModItem("IC2", "blockElectric", 2).copy();
ItemStack energiumDust = WarpDriveConfig.getModItem("IC2", "itemDust2", 2).copy();
ItemStack crystalmemory = WarpDriveConfig.getModItem("IC2", "itemcrystalmemory", -1).copy();
ItemStack itemHAMachine = new ItemStack(blockHiAdvMachine).copy();
GameRegistry.addRecipe(new ItemStack(blockShipCore),"uau", "tmt", "uau",
'a', advancedAlloy,
't', WarpDriveConfig.getModItem("IC2", "blockMachine2", 0), // Teleporter
'm', itemHAMachine,
'u', mfsu);
if (WarpDriveConfig.isOCLoaded) {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockShipController), false, new Object[] { "aha", "cmc", "apa", // With OC Adapter
'a', advancedAlloy,
'm', itemHAMachine,
'c', "circuitAdvanced",
'h', crystalmemory,
'p', WarpDriveConfig.getModItem("OpenComputers", "adapter", -1)}));
} else if (WarpDriveConfig.isComputerCraftLoaded) {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockShipController), false, new Object[] { "aha", "cmc", "apa", // With CC Modem
'a', advancedAlloy,
'm', itemHAMachine,
'c', "circuitAdvanced",
'h', crystalmemory,
'p', WarpDriveConfig.getModItem("ComputerCraft", "CC-Cable", 1)}));
} else {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockShipController), false, new Object[] { "aha", "cmc", "aca",
'a', advancedAlloy,
'm', itemHAMachine,
'c', "circuitAdvanced",
'h', crystalmemory}));
}
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockRadar), false, new Object[] { "afa", "cmc", "aca",
'a', advancedAlloy,
'm', itemHAMachine,
'c', "circuitAdvanced",
'f', WarpDriveConfig.getModItem("IC2", "itemFreq", -1)}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockWarpIsolation), false, new Object[] { "sls", "lml", "sls",
's', "plateDenseSteel",
'l', "plateDenseLead",
'm', itemHAMachine}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockAirGenerator), false, new Object[] { "lel", "vmv", "lcl",
'l', Blocks.leaves,
'm', WarpDriveConfig.getModItem("IC2", "blockMachine", 0),
'c', "circuitBasic",
'e', WarpDriveConfig.getModItem("IC2", "blockMachine", 5), // Compressor
'v', WarpDriveConfig.getModItem("IC2", "reactorVent", -1)}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockLaser), false, new Object[] { "aca", "cmc", "ala",
'm', advancedMachine,
'a', advancedAlloy,
'c', "circuitAdvanced",
'l', WarpDriveConfig.getModItem("IC2", "itemToolMiningLaser", -1)}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockMiningLaser), false, new Object[] { "pcp", "pap", "plp",
'c', "circuitAdvanced",
'p', advancedAlloy,
'a', WarpDriveConfig.getModItem("IC2", "blockMachine2", 11), // Advanced Miner
'l', blockLaser}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockLaserMedium), false, new Object[] { "efe", "aca", "ama",
'c', "circuitAdvanced",
'a', advancedAlloy,
'f', fiberGlassCable,
'e', energiumDust,
'm', mfe}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockLift), false, new Object[] { "aca", "ama", "aea",
'c', "circuitAdvanced",
'a', advancedAlloy,
'm', WarpDriveConfig.getModItem("IC2", "blockMachine", 9), // Magnetizer
'e', energiumDust}));
GameRegistry.addRecipe(new ItemStack(blockIridium), "iii", "iii", "iii",
'i', iridiumAlloy);
GameRegistry.addShapelessRecipe(new ItemStack(iridiumAlloy.getItem(), 9), new ItemStack(blockIridium));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockLaserCamera), false, new Object[] { "ala", "sss", "aca",
'a', advancedAlloy,
's', "circuitAdvanced",
'l', blockLaser,
'c', blockCamera}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCamera), false, new Object[] { "aed", "cma", "aga",
'a', advancedAlloy,
'e', WarpDriveConfig.getModItem("IC2", "itemRecipePart", 1), // Electric Motor
'd', "gemDiamond",
'c', crystalmemory,
'm', advancedMachine,
'g', WarpDriveConfig.getModItem("IC2", "itemCable", 2)}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockMonitor), false, new Object[] { "ala", "aca", "aga",
'a', advancedAlloy,
'l', Blocks.redstone_lamp,
'c', "circuitAdvanced",
'g', "paneGlassColorless" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockShipScanner), false, new Object[] { "ici", "isi", "mcm",
'm', mfsu,
'i', iridiumAlloy,
'c', "circuitAdvanced",
's', WarpDriveConfig.getModItem("IC2", "blockMachine2", 7) })); // Scanner
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockLaserTreeFarm), false, new Object[] { "awa", "cmc", "asa",
'a', advancedAlloy,
'c', "circuitAdvanced",
'w', "logWood",
'm', blockMiningLaser,
's', WarpDriveConfig.getModItem("IC2", "itemToolChainsaw", -1) }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockTransporter), false, new Object[] { "aea", "ctc", "ama",
'a', advancedAlloy,
'e', Items.ender_pearl,
'c', "circuitAdvanced",
'm', advancedMachine,
't', WarpDriveConfig.getModItem("IC2", "blockMachine2", 0) })); // Teleporter
//if (WarpDriveConfig.isIndustrialCraft2loaded) { // It is already loaded, if this set of recipes initialized.
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(itemIC2reactorLaserFocus), false, new Object[] { "a a", " d ", "a a",
'a', advancedAlloy,
'd', "gemDiamond" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockIC2reactorLaserMonitor), false, new Object[] { "pdp", "dmd", "pdp",
'p', advancedAlloy,
'd', "gemDiamond",
'm', mfe }));
//}
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCloakingCore), false, new Object[] { "ici", "cmc", "igi",
'i', blockIridium,
'c', blockCloakingCoil,
'm', blockHiAdvMachine,
'g', "circuitAdvanced" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCloakingCoil), false, new Object[] { "iai", "ccc", "iai",
'i', iridiumAlloy,
'c', WarpDriveConfig.getModItem("IC2", "itemRecipePart", 0), // Coil
'a', advancedAlloy }));
GameRegistry.addRecipe(new ItemStack(blockHiAdvMachine), "iii", "imi", "iii",
'i', iridiumAlloy,
'm', advancedMachine);
}
private static void registerSpaceDimension() {
spaceBiome = (new BiomeSpace(24)).setColor(0).setDisableRain().setBiomeName("Space");
DimensionManager.registerProviderType(WarpDriveConfig.G_SPACE_PROVIDER_ID, SpaceProvider.class, true);
@ -795,4 +970,132 @@ public class WarpDrive implements LoadingCallback {
player.addChatMessage(new ChatComponentText(line));
}
}
@Mod.EventHandler
public void remap(FMLMissingMappingsEvent event) {
for (FMLMissingMappingsEvent.MissingMapping mapping: event.get()) {
if (mapping.type == GameRegistry.Type.ITEM) {
if (mapping.name.equals("WarpDrive:airBlock")) {
mapping.remap(Item.getItemFromBlock(blockAir));
} else if (mapping.name.equals("WarpDrive:airCanisterFull")) {
mapping.remap(itemAirCanisterFull);
} else if (mapping.name.equals("WarpDrive:airgenBlock")) {
mapping.remap(Item.getItemFromBlock(blockAirGenerator));
} else if (mapping.name.equals("WarpDrive:boosterBlock")) {
mapping.remap(Item.getItemFromBlock(blockLaserMedium));
} else if (mapping.name.equals("WarpDrive:cameraBlock")) {
mapping.remap(Item.getItemFromBlock(blockCamera));
} else if (mapping.name.equals("WarpDrive:chunkLoader")) {
mapping.remap(Item.getItemFromBlock(blockChunkLoader));
} else if (mapping.name.equals("WarpDrive:cloakBlock")) {
mapping.remap(Item.getItemFromBlock(blockCloakingCore));
} else if (mapping.name.equals("WarpDrive:cloakCoilBlock")) {
mapping.remap(Item.getItemFromBlock(blockCloakingCoil));
} else if (mapping.name.equals("WarpDrive:component")) {
mapping.remap(itemComponent);
} else if (mapping.name.equals("WarpDrive:decorative")) {
mapping.remap(Item.getItemFromBlock(blockDecorative));
} else if (mapping.name.equals("WarpDrive:gasBlock")) {
mapping.remap(Item.getItemFromBlock(blockGas));
} else if (mapping.name.equals("WarpDrive:helmet")) {
mapping.remap(itemHelmet);
} else if (mapping.name.equals("WarpDrive:iridiumBlock")) {
mapping.remap(Item.getItemFromBlock(blockIridium));
} else if (mapping.name.equals("WarpDrive:isolationBlock")) {
mapping.remap(Item.getItemFromBlock(blockWarpIsolation));
} else if (mapping.name.equals("WarpDrive:laserBlock")) {
mapping.remap(Item.getItemFromBlock(blockLaser));
} else if (mapping.name.equals("WarpDrive:laserCamBlock")) {
mapping.remap(Item.getItemFromBlock(blockLaserCamera));
} else if (mapping.name.equals("WarpDrive:laserTreeFarmBlock")) {
mapping.remap(Item.getItemFromBlock(blockLaserTreeFarm));
} else if (mapping.name.equals("WarpDrive:liftBlock")) {
mapping.remap(Item.getItemFromBlock(blockLift));
} else if (mapping.name.equals("WarpDrive:miningLaserBlock")) {
mapping.remap(Item.getItemFromBlock(blockMiningLaser));
} else if (mapping.name.equals("WarpDrive:monitorBlock")) {
mapping.remap(Item.getItemFromBlock(blockMonitor));
} else if (mapping.name.equals("WarpDrive:powerLaser")) {
mapping.remap(Item.getItemFromBlock(blockEnanReactorLaser));
} else if (mapping.name.equals("WarpDrive:powerReactor")) {
mapping.remap(Item.getItemFromBlock(blockEnanReactorCore));
} else if (mapping.name.equals("WarpDrive:powerStore")) {
mapping.remap(Item.getItemFromBlock(blockEnergyBank));
} else if (mapping.name.equals("WarpDrive:protocolBlock")) {
mapping.remap(Item.getItemFromBlock(blockShipController));
} else if (mapping.name.equals("WarpDrive:radarBlock")) {
mapping.remap(Item.getItemFromBlock(blockRadar));
} else if (mapping.name.equals("WarpDrive:reactorLaserFocus")) {
mapping.remap(itemIC2reactorLaserFocus);
} else if (mapping.name.equals("WarpDrive:reactorMonitor")) {
mapping.remap(Item.getItemFromBlock(blockIC2reactorLaserMonitor));
} else if (mapping.name.equals("WarpDrive:scannerBlock")) {
mapping.remap(Item.getItemFromBlock(blockShipScanner));
} else if (mapping.name.equals("WarpDrive:transportBeacon")) {
mapping.remap(Item.getItemFromBlock(blockTransportBeacon));
} else if (mapping.name.equals("WarpDrive:transporter")) {
mapping.remap(Item.getItemFromBlock(blockTransporter));
} else if (mapping.name.equals("WarpDrive:upgrade")) {
mapping.remap(itemUpgrade);
} else if (mapping.name.equals("WarpDrive:warpCore")) {
mapping.remap(Item.getItemFromBlock(blockShipCore));
}
} else if (mapping.type == GameRegistry.Type.BLOCK) {
if (mapping.name.equals("WarpDrive:airBlock")) {
mapping.remap(blockAir);
} else if (mapping.name.equals("WarpDrive:airgenBlock")) {
mapping.remap(blockAirGenerator);
} else if (mapping.name.equals("WarpDrive:boosterBlock")) {
mapping.remap(blockLaserMedium);
} else if (mapping.name.equals("WarpDrive:cameraBlock")) {
mapping.remap(blockCamera);
} else if (mapping.name.equals("WarpDrive:chunkLoader")) {
mapping.remap(blockChunkLoader);
} else if (mapping.name.equals("WarpDrive:cloakBlock")) {
mapping.remap(blockCloakingCore);
} else if (mapping.name.equals("WarpDrive:cloakCoilBlock")) {
mapping.remap(blockCloakingCoil);
} else if (mapping.name.equals("WarpDrive:decorative")) {
mapping.remap(blockDecorative);
} else if (mapping.name.equals("WarpDrive:gasBlock")) {
mapping.remap(blockGas);
} else if (mapping.name.equals("WarpDrive:iridiumBlock")) {
mapping.remap(blockIridium);
} else if (mapping.name.equals("WarpDrive:isolationBlock")) {
mapping.remap(blockWarpIsolation);
} else if (mapping.name.equals("WarpDrive:laserBlock")) {
mapping.remap(blockLaser);
} else if (mapping.name.equals("WarpDrive:laserCamBlock")) {
mapping.remap(blockLaserCamera);
} else if (mapping.name.equals("WarpDrive:laserTreeFarmBlock")) {
mapping.remap(blockLaserTreeFarm);
} else if (mapping.name.equals("WarpDrive:liftBlock")) {
mapping.remap(blockLift);
} else if (mapping.name.equals("WarpDrive:miningLaserBlock")) {
mapping.remap(blockMiningLaser);
} else if (mapping.name.equals("WarpDrive:monitorBlock")) {
mapping.remap(blockMonitor);
} else if (mapping.name.equals("WarpDrive:powerLaser")) {
mapping.remap(blockEnanReactorLaser);
} else if (mapping.name.equals("WarpDrive:powerReactor")) {
mapping.remap(blockEnanReactorCore);
} else if (mapping.name.equals("WarpDrive:powerStore")) {
mapping.remap(blockEnergyBank);
} else if (mapping.name.equals("WarpDrive:protocolBlock")) {
mapping.remap(blockShipController);
} else if (mapping.name.equals("WarpDrive:radarBlock")) {
mapping.remap(blockRadar);
} else if (mapping.name.equals("WarpDrive:reactorMonitor")) {
mapping.remap(blockIC2reactorLaserMonitor);
} else if (mapping.name.equals("WarpDrive:scannerBlock")) {
mapping.remap(blockShipScanner);
} else if (mapping.name.equals("WarpDrive:transportBeacon")) {
mapping.remap(blockTransportBeacon);
} else if (mapping.name.equals("WarpDrive:transporter")) {
mapping.remap(blockTransporter);
} else if (mapping.name.equals("WarpDrive:warpCore")) {
mapping.remap(blockShipCore);
}
}
}
}
}

View file

@ -0,0 +1,39 @@
package cr0s.warpdrive.block.passive;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import cr0s.warpdrive.WarpDrive;
public class BlockHiAdvMachine extends Block
{
public BlockHiAdvMachine()
{
super(Material.rock);
setHardness(3.0F);
setStepSound(Block.soundTypeMetal);
setCreativeTab(WarpDrive.creativeTabWarpDrive);
setBlockName("warpdrive.passive.HiAdvMachineBlock");
}
@Override
public void registerBlockIcons(IIconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon("warpdrive:passive/hiAdvMachineSide");
}
@Override
public Item getItemDropped(int var1, Random var2, int var3)
{
return Item.getItemFromBlock(this);
}
@Override
public int quantityDropped(Random par1Random)
{
return 1;
}
}

View file

@ -14,6 +14,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.data.TransitionPlane;
// FIXME import dan200.computercraft.ComputerCraft;
@ -26,12 +27,14 @@ public class WarpDriveConfig {
*/
public static boolean isForgeMultipartLoaded = false;
public static boolean isAdvancedSolarPanelLoaded = false;
public static boolean isAE2Loaded = false;
public static boolean isAtomicScienceLoaded = false;
public static boolean isICBMLoaded = false;
public static boolean isMFFSLoaded = false;
public static boolean isGraviSuiteLoaded = false;
public static boolean isIndustrialCraft2loaded = false;
public static boolean isComputerCraftLoaded = false;
public static boolean isOCLoaded = false;
public static boolean isNetherOresLoaded = false;
public static boolean isThermalExpansionLoaded = false;
public static boolean isAdvancedRepulsionSystemsLoaded = false;
@ -76,6 +79,7 @@ public class WarpDriveConfig {
public static int G_BLOCKS_PER_TICK = 3500;
public static boolean G_ENABLE_IC2_RECIPES = true;
public static boolean G_ENABLE_HARD_IC2_RECIPES = false;
public static boolean G_ENABLE_VANILLA_RECIPES = false;
public static boolean G_ENABLE_TDK_RECIPES = false;
@ -233,7 +237,36 @@ public class WarpDriveConfig {
public static ItemStack getIC2Item(String id) {
return new ItemStack((Item) Item.itemRegistry.getObject("IC2:" + id));
}
public static Block getModBlock(String mod, String id)
{
try
{
return GameRegistry.findBlock(mod, id);
}
catch (Exception e)
{
WarpDrive.logger.info("WarpDriveConfig Call getModBlock failed for " + mod + ":" + id);
}
return null;
}
public static ItemStack getModItem(String mod, String id, int meta)
{
try
{
ItemStack item = new ItemStack((Item) Item.itemRegistry.getObject(mod+ ":" + id));
if (meta != -1)
item.setItemDamage(meta);
return item;
}
catch (Exception e)
{
WarpDrive.logger.info("WarpDriveConfig Call getModItem failed for " + mod + ":" + id + ":" + meta);
}
return null;
}
public static void preInit(Configuration configIn) {
config = configIn;
}
@ -253,6 +286,7 @@ public class WarpDriveConfig {
"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_HARD_IC2_RECIPES = config.get("General", "enable_hard_ic2_recipes", G_ENABLE_HARD_IC2_RECIPES, "Harder recipes based on IC2 by YuRaNnNzZZ").getBoolean(false);
G_ENABLE_VANILLA_RECIPES = config.get("General", "enable_vanilla_recipes", G_ENABLE_VANILLA_RECIPES, "Vanilla recipes by DarkholmeTenk").getBoolean(false);
G_ENABLE_TDK_RECIPES = config
.get("General",
@ -517,6 +551,8 @@ public class WarpDriveConfig {
}
isMagicalCropsLoaded = Loader.isModLoaded("MagicalCrops");
isAE2Loaded = Loader.isModLoaded("appliedenergistics2");
isOCLoaded = Loader.isModLoaded("OpenComputers");
//
minerOres.add(WarpDrive.blockIridium);
minerOres.add(Blocks.coal_ore);
@ -759,13 +795,21 @@ public class WarpDriveConfig {
public static Block getDefaultSurfaceBlock(Random random, boolean corrupted, boolean isMoon) {
if (isMoon) {
if (random.nextInt(5) == 1) {
if (isIndustrialCraft2loaded && random.nextInt(10) == 1)
return getModBlock("IC2", "blockBasalt");
else if (isAE2Loaded && random.nextInt(10) == 1)
return getModBlock("appliedenergistics2", "tile.BlockSkyStone");
else if (random.nextInt(5) == 1) {
return Blocks.netherrack;
} else if (random.nextInt(15) == 1) {
return Blocks.end_stone;
}
} else {
if (random.nextInt(6) == 1) {
if (isIndustrialCraft2loaded && random.nextInt(10) == 1)
return getModBlock("IC2", "blockBasalt");
else if (isAE2Loaded && random.nextInt(10) == 1)
return getModBlock("appliedenergistics2", "tile.BlockSkyStone");
else if (random.nextInt(6) == 1) {
return Blocks.netherrack;
} else if (random.nextInt(50) == 1) {
return Blocks.end_stone;
@ -793,7 +837,7 @@ public class WarpDriveConfig {
return commonWorldGenOres.get(random.nextInt(commonWorldGenOres.size()));
} else if (random.nextInt(250) == 1) {
return Blocks.diamond_ore;
} else if (!isNetherOresLoaded && (random.nextInt(10000) == 42)) {
} else if (isIndustrialCraft2loaded && (random.nextInt(10000) == 42)) {
return WarpDrive.blockIridium;
}
return def;

View file

@ -2,6 +2,7 @@ package cr0s.warpdrive.render;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.GameSettings.Options;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
@ -40,11 +41,17 @@ public class ClientCameraUtils {
check2_z = z2;
check2_blockId = block2;
WarpDrive.normalFOV = mc.gameSettings.fovSetting;
WarpDrive.normalSensitivity = mc.gameSettings.mouseSensitivity;
if (WarpDriveConfig.LOGGING_WEAPON) {
WarpDrive.logger.info("Setting viewpoint: " + entityCamera.toString());
}
mc.renderViewEntity = entityCamera;
mc.gameSettings.thirdPersonView = 0;
mc.gameSettings.setOptionFloatValue(Options.FOV, WarpDrive.camFOV);
mc.gameSettings.setOptionFloatValue(Options.SENSITIVITY, WarpDrive.camSensitivity);
WarpDrive.instance.isOverlayEnabled = true;
Keyboard.enableRepeatEvents(true);
@ -66,8 +73,8 @@ public class ClientCameraUtils {
WarpDrive.instance.isOverlayEnabled = false;
mc.gameSettings.thirdPersonView = 0;
mc.gameSettings.fovSetting = WarpDrive.normalFOV;
mc.gameSettings.mouseSensitivity = WarpDrive.normalSensitivity;
mc.gameSettings.setOptionFloatValue(Options.FOV, WarpDrive.normalFOV);
mc.gameSettings.setOptionFloatValue(Options.SENSITIVITY, WarpDrive.normalSensitivity);
entityPlayer = null;
dimensionId = -666;

View file

@ -48,7 +48,7 @@ public class SpaceWorldGenerator implements IWorldGenerator {
}
int x = (chunkX * 16) + (5 - random.nextInt(10));
int z = (chunkZ * 16) + (5 - random.nextInt(10));
if (Math.abs(x) > WarpDriveConfig.G_SPACE_WORLDBORDER_BLOCKS || Math.abs(z) > WarpDriveConfig.G_SPACE_WORLDBORDER_BLOCKS) {
if (WarpDriveConfig.G_SPACE_WORLDBORDER_BLOCKS > 0 && (Math.abs(x) > WarpDriveConfig.G_SPACE_WORLDBORDER_BLOCKS || Math.abs(z) > WarpDriveConfig.G_SPACE_WORLDBORDER_BLOCKS)) {
return;
}
int y = Y_LIMIT_SOFT_MIN + random.nextInt(Y_LIMIT_SOFT_MAX - Y_LIMIT_SOFT_MIN);

View file

@ -23,6 +23,7 @@ tile.warpdrive.passive.Air.name=Air Block
tile.warpdrive.passive.Energized.name=Energized Block
tile.warpdrive.passive.Gas.name=Gas Block
tile.warpdrive.passive.IridiumBlock.name=Iridium Block
tile.warpdrive.passive.HiAdvMachineBlock.name=Highly Advanced Machine Block
tile.warpdrive.passive.Network.name=Network Block
tile.warpdrive.passive.Plain.name=Plain Block
tile.warpdrive.passive.TransportBeacon.name=Transport Beacon

View file

@ -0,0 +1,58 @@
item.warpdrive.crafting.Malformed.name=Bad Item
item.warpdrive.crafting.EmptyCore.name=Основа для ядра
item.warpdrive.crafting.TeleCore.name=Ядро телепортации
item.warpdrive.crafting.WarpCore.name=Ядро перемещения
item.warpdrive.crafting.LaserCore.name=Лазерное ядро
item.warpdrive.crafting.ReactorCore.name=Ядро реактора
item.warpdrive.crafting.InterfaceComputer.name=Сигнальный интерфейс
item.warpdrive.crafting.InterfacePower.name=Интерфейс питания
item.warpdrive.crafting.PowerCore.name=Энергетическое ядро
item.warpdrive.crafting.AirCanisterEmpty.name=Пустой воздушный баллон
item.warpdrive.energy.IC2reactorLaserFocus.name=Фокусировщик лазера реактора IC2
item.warpdrive.armor.AirCanisterFull.name=Баллон воздуха
item.warpdrive.armor.Helmet.name=Космический шлем
item.warpdrive.upgrade.Power.name=Улучшение питания
item.warpdrive.upgrade.Speed.name=Улучшение скорости
item.warpdrive.upgrade.Range.name=Улучшение радиуса
item.warpdrive.upgrade.Energy.name=Улучшение энергии
tile.warpdrive.passive.Air.name=Воздух
tile.warpdrive.passive.Energized.name=Блок под напряжением
tile.warpdrive.passive.Gas.name=Газ
tile.warpdrive.passive.IridiumBlock.name=Блок иридия
tile.warpdrive.passive.HiAdvMachineBlock.name=Высокотехнологичный корпус механизма
tile.warpdrive.passive.Network.name=Сетевой блок
tile.warpdrive.passive.Plain.name=Простой блок
tile.warpdrive.passive.TransportBeacon.name=Маяк для транспортера
tile.warpdrive.machines.AirGenerator.name=Генератор воздуха
tile.warpdrive.machines.ChunkLoader.name=Загрузчик чанков
tile.warpdrive.machines.Laser.name=Лазер
tile.warpdrive.machines.LaserMedium.name=Лазерный ускоритель частиц
tile.warpdrive.building.ShipScanner.name=Сканер корабля
tile.warpdrive.collection.LaserTreeFarm.name=Лазерная ферма деревьев
tile.warpdrive.collection.MiningLaser.name=Лазерная буровая установка
tile.warpdrive.detection.Camera.name=Камера видеонаблюдения
tile.warpdrive.detection.CloakingCoil.name=Катушка маскировщика
tile.warpdrive.detection.CloakingCore.name=Маскировщик
tile.warpdrive.detection.Monitor.name=Монитор видеонаблюдения
tile.warpdrive.detection.Radar.name=Варп-радар
tile.warpdrive.detection.WarpIsolation.name=Блок изоляции варп-поля
tile.warpdrive.energy.EnanReactorCore.name=Энантиоморфный реактор
tile.warpdrive.energy.EnanReactorLaser.name=Лазер стабилизации реактора Аурбиса
tile.warpdrive.energy.EnergyBank.name=Хранилище энергии Ану
tile.warpdrive.energy.IC2ReactorLaserMonitor.name=Монитор лазера реактора IC2
tile.warpdrive.movement.Lift.name=Лазерный лифт
tile.warpdrive.movement.ShipController.name=Контроллер корабля
tile.warpdrive.movement.ShipCore.name=Ядро корабля
tile.warpdrive.movement.Transporter.name=Транспортер
tile.warpdrive.weapon.LaserCamera.name=Боевая камера видеонаблюдения

View file

@ -1,9 +1,40 @@
if not(fs.exists("san")) then
shell.run("pastebin","get wf2EBfvT san")
end
if not(fs.exists("mcwarp")) then
shell.run("san"," install mcwarp")
local sg = {}
sg.filename = "san-get"
sg.installed = false
local mw = {}
mw.filename = "mcwarp"
mw.installed = false
write("Checking for san-get... ")
if not(fs.exists(sg.filename)) then
print("not installed.")
elseif (fs.isDir(sg.filename)) then
print("it is directory?!?")
fs.delete(sg.filename) -- установка любой ценой
else
shell.run("san"," update mcwarp")
print("installed.")
sg.installed = true
end
os.reboot()
if not sg.installed then shell.run("pastebin","run", "qe4nQP8F") end
write("Checking for mcwarp... ")
if not(fs.exists(mw.filename)) then
print("not installed.")
shell.run("san-get", "install", "mcwarp")
elseif (fs.isDir(mw.filename)) then
print("it is directory?!?")
fs.delete(mw.filename) -- установка любой ценой (2)
else
print("installed.")
mw.installed = true
end
if mw.installed then
shell.run("san-get","update", "mcwarp")
print("Multicore Warper updated successfully.")
else
shell.run("san-get", "install", "mcwarp")
print("Multicore Warper installed successfully.")
print("Run mcwarp to setup your ship.")
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B