Fixed crash on loading energy from prefab
This commit is contained in:
parent
2ba17ae22c
commit
118358a768
1 changed files with 2 additions and 2 deletions
|
@ -389,11 +389,11 @@ public abstract class TileEntityEnergyMachine extends TileEntityMachine implemen
|
||||||
NBTBase tag = nbt.getTag("energyStored");
|
NBTBase tag = nbt.getTag("energyStored");
|
||||||
if (tag instanceof NBTTagFloat)
|
if (tag instanceof NBTTagFloat)
|
||||||
{
|
{
|
||||||
this.setEnergy(ForgeDirection.UNKNOWN, (long) nbt.getFloat("energyStored") * 1000);
|
this.energyStored = (long) nbt.getFloat("energyStored") * 1000;
|
||||||
}
|
}
|
||||||
else if (tag instanceof NBTTagLong)
|
else if (tag instanceof NBTTagLong)
|
||||||
{
|
{
|
||||||
this.setEnergy(ForgeDirection.UNKNOWN, nbt.getLong("energyStored"));
|
this.energyStored = nbt.getLong("energyStored");
|
||||||
}
|
}
|
||||||
|
|
||||||
runWithoutPower = !nbt.getBoolean("shouldPower");
|
runWithoutPower = !nbt.getBoolean("shouldPower");
|
||||||
|
|
Loading…
Reference in a new issue