From ba3bc7776c523a274b6b60adadc18036a32f27e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Wed, 26 Jan 2022 00:16:07 +0100 Subject: [PATCH] Add never called overrides with exception for clarity. --- .../oc2/common/bus/device/rpc/RPCDeviceList.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/li/cil/oc2/common/bus/device/rpc/RPCDeviceList.java b/src/main/java/li/cil/oc2/common/bus/device/rpc/RPCDeviceList.java index 21dda6cb..d5d03b50 100644 --- a/src/main/java/li/cil/oc2/common/bus/device/rpc/RPCDeviceList.java +++ b/src/main/java/li/cil/oc2/common/bus/device/rpc/RPCDeviceList.java @@ -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 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(); + } }