mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 15:03:07 +00:00
Merge pull request #2802 from HenryLoenwind/createTask
Logic fix for reading the current task from nbt
This commit is contained in:
commit
f928709e52
2 files changed
+1
-5
No files matched your search
@@ -363,7 +363,7 @@ public abstract class AbstractPoweredTaskEntity extends AbstractPowerConsumerEnt
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound nbtRoot) {
|
||||
super.readCustomNBT(nbtRoot);
|
||||
currentTask = createTask(nbtRoot.getCompoundTag("currentTask"));
|
||||
currentTask = nbtRoot.hasKey("currentTask") ? createTask(nbtRoot.getCompoundTag("currentTask")) : null;
|
||||
String uid = nbtRoot.getString("lastCompletedRecipe");
|
||||
lastCompletedRecipe = MachineRecipeRegistry.instance.getRecipeForUid(uid);
|
||||
}
|
||||
|
||||
@@ -147,10 +147,6 @@ public class PoweredTask implements IPoweredTask {
|
||||
}
|
||||
|
||||
public static IPoweredTask readFromNBT(NBTTagCompound nbtRoot) {
|
||||
if(nbtRoot == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
IMachineRecipe recipe;
|
||||
|
||||
float usedEnergy = nbtRoot.getFloat(KEY_USED_ENERGY);
|
||||
|
||||
Reference in new issue
Block a user