Fix PoweredTask being hardcoded where it should not be

This commit is contained in:
HenryLoenwind committed 2015-09-08 15:04:36 +02:00
1 parent 7ad6fe2d89
commit 38cddc2405
1 file changed
+5 -1
@@ -356,10 +356,14 @@ public abstract class AbstractPoweredTaskEntity extends AbstractPowerConsumerEnt
return new PoweredTask(nextRecipe, chance, getRecipeInputs());
}
protected IPoweredTask createTask(NBTTagCompound taskTagCompound) {
return PoweredTask.readFromNBT(taskTagCompound);
}
@Override
public void readCustomNBT(NBTTagCompound nbtRoot) {
super.readCustomNBT(nbtRoot);
currentTask = PoweredTask.readFromNBT(nbtRoot.getCompoundTag("currentTask"));
currentTask = createTask(nbtRoot.getCompoundTag("currentTask"));
String uid = nbtRoot.getString("lastCompletedRecipe");
lastCompletedRecipe = MachineRecipeRegistry.instance.getRecipeForUid(uid);
}