mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Better Factory energy usage display, added new reactor LUA commands
This commit is contained in:
1 parent
38a68541c4
commit
97eeeb5ed3
3 files changed
+22
-2
No files matched your search
@@ -118,6 +118,8 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
|
||||
public boolean sorting;
|
||||
|
||||
public boolean upgraded;
|
||||
|
||||
public double lastUsage;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public SoundWrapper[] sounds;
|
||||
@@ -332,6 +334,8 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
|
||||
else {
|
||||
recipeTicks = 0;
|
||||
}
|
||||
|
||||
double prev = getEnergy();
|
||||
|
||||
secondaryEnergyThisTick = recipeType.fuelEnergyUpgrades() ? StatUtils.inversePoisson(secondaryEnergyPerTick) : (int)Math.ceil(secondaryEnergyPerTick);
|
||||
|
||||
@@ -392,6 +396,7 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
|
||||
infuseStored.type = null;
|
||||
}
|
||||
|
||||
lastUsage = prev-getEnergy();
|
||||
prevEnergy = getEnergy();
|
||||
}
|
||||
}
|
||||
@@ -778,6 +783,7 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
|
||||
controlType = RedstoneControl.values()[dataStream.readInt()];
|
||||
sorting = dataStream.readBoolean();
|
||||
upgraded = dataStream.readBoolean();
|
||||
lastUsage = dataStream.readDouble();
|
||||
infuseStored.amount = dataStream.readInt();
|
||||
infuseStored.type = InfuseRegistry.get(PacketHandler.readString(dataStream));
|
||||
|
||||
@@ -877,6 +883,7 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
|
||||
data.add(controlType.ordinal());
|
||||
data.add(sorting);
|
||||
data.add(upgraded);
|
||||
data.add(lastUsage);
|
||||
data.add(infuseStored.amount);
|
||||
|
||||
if(infuseStored.type != null)
|
||||
|
||||
Reference in new issue
Block a user