First pass complete.

This commit is contained in:
CrazyPants committed 2014-09-04 02:43:52 +08:00
1 parent 24fc445ef8
commit 9902964749
7 files changed
+21 -12

No files matched your search

@@ -59,7 +59,7 @@ public final class Config {
public static final Section sectionKiller = new Section("Killer Joe Settings", "killerjoe");
public static final Section sectionSoulBinder = new Section("Soul Binder Settings", "soulBinder");
public static final double DEFAULT_CONDUIT_SCALE = 0.5;
public static final double DEFAULT_CONDUIT_SCALE = 0.6;
public static boolean reinforcedObsidianEnabled = true;
@@ -40,6 +40,7 @@ public class MachineRecipes {
ItemStack fusedQuartz = new ItemStack(EnderIO.blockFusedQuartz, 1, 0);
ItemStack enlightedQuartz = new ItemStack(EnderIO.blockFusedQuartz, 1, 2);
ItemStack fusedGlass = new ItemStack(EnderIO.blockFusedQuartz, 1, 1);
ItemStack soularium = new ItemStack(EnderIO.itemAlloy, 1, Alloy.SOULARIUM.ordinal());
//stirling gen
ItemStack stirlingGen = new ItemStack(EnderIO.blockStirlingGenerator, 1, 0);
@@ -147,6 +148,10 @@ public class MachineRecipes {
ItemStack vacuumChest = new ItemStack(EnderIO.blockVacuumChest);
GameRegistry.addShapedRecipe(vacuumChest, "iii", "ici","ipi", 'i', Items.iron_ingot, 'c', Blocks.chest, 'p', pulCry);
//Soul Binder
ItemStack soulBinder = new ItemStack(EnderIO.blockSoulFuser);
GameRegistry.addShapedRecipe(soulBinder, "sss", "sms","ece", 's', soularium, 'm', machineChassi, 'c', capacitor, 'e', new ItemStack(EnderIO.blockEndermanSkull));
ClearConfigRecipe inst = new ClearConfigRecipe();
MinecraftForge.EVENT_BUS.register(inst);
GameRegistry.addRecipe(inst);
@@ -47,8 +47,10 @@ public class HyperCubeRenderer extends TileEntitySpecialRenderer implements IIte
model.render(cube, x, y, z);
if(cube.getEnergyStored() > 0) {
if(cube.getChannel() != null) {
//if(cube.getEnergyStored() > 0) {
renderPower(te.getWorldObj(), x, y, z, cube.getChannel() != null);
//}
}
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
@@ -165,7 +165,7 @@ public class TileHyperCube extends TileEntityEio implements IInternalPowerRecept
}
int getEnergyStoredScaled(int scale) {
return (int) VecmathUtil.clamp(Math.round(scale * (getEnergyStored() / getMaxEnergyStored())), 0, scale);
return (int) VecmathUtil.clamp(Math.round(scale * ((double)getEnergyStored() / getMaxEnergyStored())), 0, scale);
}
public void onBreakBlock() {
@@ -10,6 +10,7 @@ import net.minecraft.world.EnumSkyBlock;
import net.minecraftforge.common.util.ForgeDirection;
import crazypants.enderio.EnderIO;
import crazypants.enderio.TileEntityEio;
import crazypants.enderio.power.BasicCapacitor;
import crazypants.enderio.power.Capacitors;
import crazypants.enderio.power.ICapacitor;
import crazypants.enderio.power.IInternalPowerReceptor;
@@ -43,7 +44,7 @@ public class TileElectricLight extends TileEntityEio implements IInternalPowerRe
private int energyStoredRF;
public TileElectricLight() {
capacitor = Capacitors.BASIC_CAPACITOR.capacitor;
capacitor = new BasicCapacitor(Capacitors.BASIC_CAPACITOR.capacitor.getMaxEnergyReceived(), 100);
energyStoredRF = 0;
}
@@ -23,7 +23,7 @@ public class TileEntitySolarPanel extends TileEntity implements IInternalPowerRe
private ListIterator<Receptor> receptorIterator = receptors.listIterator();
private boolean receptorsDirty = true;
private float lastCollectionValue = -1;
private int lastCollectionValue = -1;
private int checkOffset;
private static final int CHECK_INTERVAL = 100;
@@ -31,7 +31,7 @@ public class TileEntitySolarPanel extends TileEntity implements IInternalPowerRe
public TileEntitySolarPanel() {
checkOffset = (int) (Math.random() * 20);
capacitor = new BasicCapacitor(0, 10000, 10);
capacitor = new BasicCapacitor(0, 10000, Config.maxPhotovoltaicAdvancedOutputRF * 5);
}
@@ -87,7 +87,7 @@ public class TileEntitySolarPanel extends TileEntity implements IInternalPowerRe
@Override
public void setEnergyStored(int stored) {
storedEnergyRF = stored;
storedEnergyRF = Math.max(stored, 0);
}
@@ -107,10 +107,11 @@ public class TileEntitySolarPanel extends TileEntity implements IInternalPowerRe
if(lastCollectionValue == -1 || (worldObj.getWorldTime() + checkOffset) % CHECK_INTERVAL == 0) {
float fromSun = calculateLightRatio();
lastCollectionValue = getEnergyPerTick() * fromSun;
lastCollectionValue = Math.round(getEnergyPerTick() * fromSun);
}
if(lastCollectionValue > 0) {
storedEnergyRF = Math.min(lastCollectionValue + storedEnergyRF, capacitor.getMaxEnergyStored());
}
float collected = lastCollectionValue;
storedEnergyRF += collected;
}
private int getEnergyPerTick() {
@@ -66,10 +66,10 @@ public class TilePoweredSpawner extends AbstractPoweredTaskEntity {
capacitor = CAP_ONE;
break;
case ACTIVATED_CAPACITOR:
capacitor = CAP_ONE;
capacitor = CAP_TWO;
break;
case ENDER_CAPACITOR:
capacitor = CAP_ONE;
capacitor = CAP_THREE;
break;
default:
capacitor = CAP_ONE;