Added recipes and tweaked solar module.

This commit is contained in:
Andrew2448 2013-02-18 04:02:04 -05:00
parent 79b7c21e13
commit dd49c35e15
4 changed files with 47 additions and 13 deletions

View file

@ -59,8 +59,9 @@ public abstract class ModularCommon {
public static final String WALKING_ENERGY_CONSUMPTION = "Walking Energy Consumption";
public static final String WALKING_SPEED_MULTIPLIER = "Walking Speed Multiplier";
public static final String EATING_ENERGY_CONSUMPTION = "Eating Energy Consumption";
public static final String SOLAR_ENERGY_GENERATION = "Solar Energy Generation";
public static final String SOLAR_ENERGY_GENERATION_DAY = "Daytime Solar Energy Generation";
public static final String SOLAR_ENERGY_GENERATION_NIGHT = "Nighttime Solar Energy Generation";
/**
* Module names
*/

View file

@ -247,7 +247,8 @@ public class Config {
module = new PowerModule(ModularCommon.MODULE_SOLAR_GENERATOR, HEADONLY, MuseIcon.NEXUS_1_GREEN, ModularCommon.CATEGORY_ENERGY)
.setDescription("Let the sun power your adventures.")
.addBaseProperty(ModularCommon.SOLAR_ENERGY_GENERATION, 1)
.addBaseProperty(ModularCommon.SOLAR_ENERGY_GENERATION_DAY, 100)
.addBaseProperty(ModularCommon.SOLAR_ENERGY_GENERATION_NIGHT, 10)
.addInstallCost(copyAndResize(ItemComponent.solarPanel, 1))
.addInstallCost(copyAndResize(ItemComponent.controlCircuit, 2));
addModule(module);

View file

@ -28,6 +28,7 @@ public class RecipeManager {
ItemStack string = new ItemStack(Item.silk);
ItemStack paper = new ItemStack(Item.paper);
ItemStack glass = new ItemStack(Block.glass);
ItemStack glassPane = new ItemStack(Block.thinGlass);
ItemStack glowstone = new ItemStack(Item.lightStoneDust);
ItemStack emerald = new ItemStack(Item.emerald);
ItemStack diamond = new ItemStack(Item.diamond);
@ -173,13 +174,12 @@ public class RecipeManager {
'E', ItemComponent.solenoid,
'G', glowstone,
'F', ItemComponent.fieldEmitter);
GameRegistry.addRecipe(ItemComponent.solarPanel,
"GGG",
"BBB",
"SSS",
'G', glass,
'B', lapis,
'S', stone);
GameRegistry.addRecipe(new ShapedOreRecipe (ItemComponent.solarPanel,
"PPP",
"PLP",
"PPP",
'P', glassPane,
'L', lapis));
}
if (ModCompatability.UERecipesEnabled() && ModCompatability.isBasicComponentsLoaded()) {
@ -318,6 +318,15 @@ public class RecipeManager {
'G', glowstone,
'C', "advancedCircuit",
'F', ItemComponent.fieldEmitter));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true,
"GGG",
"CLC",
"SSS",
'G', glass,
'C', basicCircuit,
'L', lapisBlock,
'S', "plateSteel"));
}
if (ModCompatability.IC2RecipesEnabled() && ModCompatability.isIndustrialCraftLoaded()) {
circuit = ModCompatability.getIC2Item("electronicCircuit");
@ -334,6 +343,7 @@ public class RecipeManager {
ItemStack carbonPlate = ModCompatability.getIC2Item("carbonPlate");
ItemStack machine = ModCompatability.getIC2Item("machine");
ItemStack advMachine = ModCompatability.getIC2Item("advancedMachine");
ItemStack gen = ModCompatability.getIC2Item("generator");
try {
ItemStack refinedIron = OreDictionary.getOres("ingotRefinedIron").get(0);
@ -477,6 +487,15 @@ public class RecipeManager {
'G', glowstone,
'C', advCircuit.copy(),
'M', advMachine.copy()));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true,
"LGL",
"GLG",
"CBC",
'L', lapis,
'G', glass,
'C', circuit,
'B', gen));
}
if (ModCompatability.GregTechRecipesEnabled() && ModCompatability.isIndustrialCraftLoaded() && ModCompatability.isGregTechLoaded()) {
// This means Gregtech is installed, and GregoriusT in his infinite
@ -496,6 +515,7 @@ public class RecipeManager {
ItemStack carbonPlate = ModCompatability.getIC2Item("carbonPlate");
ItemStack uninsulatedCopper = ModCompatability.getIC2Item("copperCableItem");
ItemStack luminator = ModCompatability.getIC2Item("luminator");
ItemStack reinforcedGlass = ModCompatability.getIC2Item("reinforcedGlass");
try {
ItemStack titanium = OreDictionary.getOres("ingotSteel").get(0);
@ -677,6 +697,13 @@ public class RecipeManager {
'N', neutronReflector,
'C', ItemComponent.hvcapacitor,
'F', ItemComponent.fieldEmitter));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true,
"GGG",
"PCP",
'G', reinforcedGlass,
'P', "plateIridium",
'C', energyFlowCircuit));
}
if (ModCompatability.ThermalExpansionRecipesEnabled() && ModCompatability.isThermalExpansionLoaded()) {
ItemStack pneumaticServo = ModCompatability.getThermexItem("pneumaticServo", 1);

View file

@ -392,9 +392,14 @@ public class PlayerTickHandler implements ITickHandler {
}
isRaining = canRain && (world.isRaining() || world.isThundering()); //Make sure you're not in desert - Thanks cpw :P
boolean sunVisible = world.isDaytime() && !isRaining && world.canBlockSeeTheSky(xCoord, MathHelper.floor_double(player.posY) + 1, zCoord);
if (!world.isRemote && !world.provider.hasNoSky && sunVisible && (world.getTotalWorldTime() % 100) == 0) {
MuseItemUtils.givePlayerEnergy(player, ModuleManager.computeModularProperty(helmet, ModularCommon.SOLAR_ENERGY_GENERATION));
player.sendChatToPlayer("Charging 1 J");
boolean moonVisible = !world.isDaytime() && !isRaining && world.canBlockSeeTheSky(xCoord, MathHelper.floor_double(player.posY) + 1, zCoord);
if (!world.isRemote && !world.provider.hasNoSky && (world.getTotalWorldTime() % 100) == 0) {
if (sunVisible) {
MuseItemUtils.givePlayerEnergy(player, ModuleManager.computeModularProperty(helmet, ModularCommon.SOLAR_ENERGY_GENERATION_DAY));
}
else if (moonVisible) {
MuseItemUtils.givePlayerEnergy(player, ModuleManager.computeModularProperty(helmet, ModularCommon.SOLAR_ENERGY_GENERATION_NIGHT));
}
}
}