Revert "Power system re-write, recipe fixes."

This reverts commit d982cc4028.

# Conflicts:
#	src/main/java/techreborn/init/ModRecipes.java
This commit is contained in:
modmuss50 2016-08-10 00:51:44 +01:00
parent aa05d906f9
commit d96149fc97
47 changed files with 937 additions and 1361 deletions

View file

@ -10,7 +10,6 @@ import reborncore.api.power.EnumPowerTier;
import reborncore.common.powerSystem.TilePowerAcceptor;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModBlocks;
import techreborn.power.PowerNet;
public class TileIDSU extends TilePowerAcceptor implements IWrenchable
{
@ -126,26 +125,32 @@ public class TileIDSU extends TilePowerAcceptor implements IWrenchable
return nbttagcompound;
}
public void updateEntity() {
public void updateEntity()
{
super.updateEntity();
if (ticks == ConfigTechReborn.AverageEuOutTickTime) {
if (ticks == ConfigTechReborn.AverageEuOutTickTime)
{
euChange = -1;
ticks = 0;
} else {
} else
{
ticks++;
euChange += getEnergy() - euLastTick;
if (euLastTick == getEnergy()) {
if (euLastTick == getEnergy())
{
euChange = 0;
}
}
euLastTick = getEnergy();
if (!worldObj.isRemote && getEnergy() > 0) {
double maxOutput = getEnergy() > getMaxOutput() ? getMaxOutput() : getEnergy();
useEnergy(PowerNet.dispatchEnergyPacket(worldObj, getPos(), maxOutput));
boolean needsInvUpdate = false;
if (needsInvUpdate)
{
this.markDirty();
}
}