Temporary OreDict bus serialization fix

Fixes #542
This commit is contained in:
NotMyWing
2025-03-25 16:57:55 +11:00
parent e175bccace
commit 26bb5986c6
@@ -41,6 +41,7 @@ import appeng.items.tools.quartz.ToolQuartzCuttingKnife;
import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.AENetworkProxy;
import appeng.me.helpers.IGridProxyable; import appeng.me.helpers.IGridProxyable;
import appeng.parts.automation.PartLevelEmitter; import appeng.parts.automation.PartLevelEmitter;
import appeng.parts.misc.PartOreDicStorageBus;
import appeng.parts.networking.PartCable; import appeng.parts.networking.PartCable;
import appeng.tile.inventory.AppEngInternalAEInventory; import appeng.tile.inventory.AppEngInternalAEInventory;
import appeng.util.Platform; import appeng.util.Platform;
@@ -315,6 +316,10 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
if (cm != null) { if (cm != null) {
cm.readFromNBT(compound); cm.readFromNBT(compound);
} }
if (this instanceof PartOreDicStorageBus oreDicStorageBus) {
oreDicStorageBus.saveOreMatch(compound.getString("oreMatch"));
}
} }
if (this instanceof IPriorityHost) { if (this instanceof IPriorityHost) {
@@ -378,6 +383,10 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
cm.writeToNBT(output); cm.writeToNBT(output);
} }
if (this instanceof PartOreDicStorageBus oreDicStorageBus) {
output.setString("oreMatch", oreDicStorageBus.getOreExp());
}
if (this instanceof IPriorityHost) { if (this instanceof IPriorityHost) {
final IPriorityHost pHost = (IPriorityHost) this; final IPriorityHost pHost = (IPriorityHost) this;
output.setInteger("priority", pHost.getPriority()); output.setInteger("priority", pHost.getPriority());