Add never called overrides with exception for clarity.

This commit is contained in:
Florian Nücke
2022-01-26 00:16:07 +01:00
parent ded98fc652
commit ba3bc7776c

View File

@@ -2,6 +2,7 @@ package li.cil.oc2.common.bus.device.rpc;
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
import li.cil.oc2.api.bus.device.rpc.RPCMethod;
import net.minecraft.nbt.CompoundTag;
import java.util.ArrayList;
import java.util.Collection;
@@ -46,4 +47,17 @@ public record RPCDeviceList(ArrayList<RPCDevice> devices) implements RPCDevice {
device.suspend();
}
}
// NB: We only use the list device in the adapter, for referencing grouped devices by their ID.
// As such, serialize/deserialize will never be called on this class.
@Override
public CompoundTag serializeNBT() {
throw new UnsupportedOperationException();
}
@Override
public void deserializeNBT(final CompoundTag tag) {
throw new UnsupportedOperationException();
}
}