mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-15 01:25:13 +00:00
Compare commits
5
Commits
master
...
2.3.1.56-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1e8e27a3e | ||
|
|
1a84a1cb26 | ||
|
|
1207133f98 | ||
|
|
480feef6f7 | ||
|
|
450f31bd73 |
No files matched your search
@@ -288,6 +288,10 @@ public final class Config {
|
||||
public static int maxPhotovoltaicAdvancedOutputRF = 40;
|
||||
public static int maxPhotovoltaicVibrantOutputRF = 160;
|
||||
|
||||
public static int photovoltaicCellCapacityRF = 10000;
|
||||
public static int photovoltaicAdvancedCellCapacityRF = 10000;
|
||||
public static int photovoltaicVibrantCellCapacityRF = 10000;
|
||||
|
||||
public static int zombieGeneratorRfPerTick = 80;
|
||||
public static int zombieGeneratorTicksPerBucketFuel = 12000;
|
||||
|
||||
@@ -808,6 +812,26 @@ public final class Config {
|
||||
"Maximum output in RF/t of the Vibrant Photovoltaic Panels.")
|
||||
.getInt(maxPhotovoltaicVibrantOutputRF);
|
||||
|
||||
photovoltaicCellCapacityRF = config.get(
|
||||
sectionPower.name,
|
||||
"photovoltaicCellCapacityRF",
|
||||
photovoltaicCellCapacityRF,
|
||||
"Maximum capacity in RF/t of the Photovoltaic Panels.").getInt(photovoltaicCellCapacityRF);
|
||||
photovoltaicAdvancedCellCapacityRF = config
|
||||
.get(
|
||||
sectionPower.name,
|
||||
"photovoltaicAdvancedCellCapacityRF",
|
||||
photovoltaicAdvancedCellCapacityRF,
|
||||
"Maximum capacity in RF/t of the Advanced Photovoltaic Panels.")
|
||||
.getInt(photovoltaicAdvancedCellCapacityRF);
|
||||
photovoltaicVibrantCellCapacityRF = config
|
||||
.get(
|
||||
sectionPower.name,
|
||||
"photovoltaicVibrantCellCapacityRF",
|
||||
photovoltaicVibrantCellCapacityRF,
|
||||
"Maximum capacity in RF/t of the Vibrant Photovoltaic Panels.")
|
||||
.getInt(photovoltaicVibrantCellCapacityRF);
|
||||
|
||||
useAlternateBinderRecipe = config
|
||||
.get(
|
||||
sectionRecipe.name,
|
||||
|
||||
@@ -10,6 +10,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cofh.api.energy.EnergyStorage;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import crazypants.enderio.config.Config;
|
||||
|
||||
public class SolarPanelNetwork {
|
||||
|
||||
@@ -25,12 +26,13 @@ public class SolarPanelNetwork {
|
||||
|
||||
public SolarPanelNetwork() {
|
||||
panels = Lists.newArrayList();
|
||||
energy = new EnergyStorage(ENERGY_PER);
|
||||
energy = new EnergyStorage(getCapacity());
|
||||
}
|
||||
|
||||
SolarPanelNetwork(TileEntitySolarPanel initial) {
|
||||
this();
|
||||
panels.add(initial);
|
||||
energy.setCapacity(getCapacity(initial, 1));
|
||||
empty = false;
|
||||
}
|
||||
|
||||
@@ -83,8 +85,40 @@ public class SolarPanelNetwork {
|
||||
destroyNetwork();
|
||||
}
|
||||
|
||||
private int getCapacity() {
|
||||
int capacity = ENERGY_PER;
|
||||
|
||||
if (panels.size() > 0) {
|
||||
TileEntitySolarPanel masterPanel = getMaster();
|
||||
capacity = getCapacity(masterPanel, panels.size());
|
||||
}
|
||||
|
||||
return capacity;
|
||||
}
|
||||
|
||||
private static int getCapacity(TileEntitySolarPanel panel, int panelsCount) {
|
||||
int capacity = ENERGY_PER;
|
||||
int meta = panel.getBlockMetadata();
|
||||
|
||||
switch (meta) {
|
||||
case 0: // Default
|
||||
capacity = Config.photovoltaicCellCapacityRF;
|
||||
break;
|
||||
case 1: // Advanced
|
||||
capacity = Config.photovoltaicAdvancedCellCapacityRF;
|
||||
break;
|
||||
case 2: // Vibrant
|
||||
capacity = Config.photovoltaicVibrantCellCapacityRF;
|
||||
break;
|
||||
}
|
||||
|
||||
capacity = capacity * panelsCount;
|
||||
|
||||
return capacity;
|
||||
}
|
||||
|
||||
private void updateEnergy() {
|
||||
energy.setCapacity(ENERGY_PER * panels.size());
|
||||
energy.setCapacity(getCapacity());
|
||||
energy.setMaxExtract(energy.getMaxEnergyStored());
|
||||
}
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ public class WailaCompat implements IWailaDataProvider {
|
||||
return;
|
||||
}
|
||||
|
||||
if (itemStack.getItem() == EnderIO.itemPowerConduit) {
|
||||
if (itemStack.getItem() == EnderIO.itemPowerConduit || itemStack.getItem() == EnderIO.itemPowerConduitEndergy) {
|
||||
NBTTagCompound nbtRoot = _accessor.getNBTData();
|
||||
if (nbtRoot.hasKey("storedEnergyRF")) {
|
||||
int stored = nbtRoot.getInteger("storedEnergyRF");
|
||||
|
||||
Reference in new issue
Block a user