mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-17 02:55:06 +00:00
Logic fix for reading the current task from nbt
getCompoundTag() never returns null, it returns a new empty object instead
This commit is contained in:
1 parent
381ec53bbf
commit
2cf3e979df
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user