mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-23 21:39:40 +00:00
Fixed usage displays of certain machinery
This commit is contained in:
1 parent
cd323920fe
commit
0c9fd9364e
8 files changed
+40
-27
No files matched your search
@@ -63,6 +63,8 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
|
||||
public ChemicalInfuserRecipe cachedRecipe;
|
||||
|
||||
public double clientEnergyUsed;
|
||||
|
||||
public TileComponentUpgrade upgradeComponent = new TileComponentUpgrade(this, 4);
|
||||
|
||||
/** This machine's current RedstoneControl type. */
|
||||
@@ -126,7 +128,10 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
setActive(true);
|
||||
|
||||
int operations = operate(recipe);
|
||||
double prev = getEnergy();
|
||||
|
||||
setEnergy(getEnergy() - energyPerTick*operations);
|
||||
clientEnergyUsed = prev-getEnergy();
|
||||
}
|
||||
else {
|
||||
if(prevEnergy >= getEnergy())
|
||||
@@ -235,6 +240,7 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
|
||||
isActive = dataStream.readBoolean();
|
||||
controlType = RedstoneControl.values()[dataStream.readInt()];
|
||||
clientEnergyUsed = dataStream.readDouble();
|
||||
|
||||
if(dataStream.readBoolean())
|
||||
{
|
||||
@@ -271,6 +277,7 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
|
||||
data.add(isActive);
|
||||
data.add(controlType.ordinal());
|
||||
data.add(clientEnergyUsed);
|
||||
|
||||
if(leftTank.getGas() != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user