public PacketExistingItemFilterSnapshot onMessage(PacketExistingItemFilterSnapshot message, MessageContext ctx) {
IItemConduit conduit = message.getTileCasted(ctx);
if(conduit == null) {
return null;
}
ExistingItemFilter filter;
if(message.isInput) {
filter = (ExistingItemFilter)conduit.getInputFilter(message.dir);
} else {
filter = (ExistingItemFilter)conduit.getOutputFilter(message.dir);
}
if(message.isClear) {
filter.setSnapshot((List<ItemStack>)null);
System.out.println("PacketExistingItemFilterSnapshot.onMessage: Cleared snapshot");
} else {
ItemConduitNetwork icn = (ItemConduitNetwork)conduit.getNetwork();
NetworkedInventory inv = icn.getInventory(conduit, message.dir);
filter.setSnapshot(inv);
}
if(message.isInput) {
conduit.setInputFilter(message.dir, filter);
} else {