package crazypants.enderio.transceiver;

import java.util.EnumMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class ChannelList extends EnumMap<ChannelType, Set<Channel>> {

  private static final long serialVersionUID = 3922673078596352247L;

  public ChannelList() {
    super(ChannelType.class);
    for (ChannelType channelType : ChannelType.values()) {
      super.put(channelType, new HashSet<Channel>());
    }
  }

  @Override
  @Deprecated // so accidental usage shows up
  public Set<Channel> put(ChannelType key, Set<Channel> value) {
    throw new UnsupportedOperationException();
  }

  @Override
  @Deprecated // so accidental usage shows up
  public Set<Channel> remove(Object key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void putAll(Map<? extends ChannelType, ? extends Set<Channel>> source) {
    for (Set<Channel> chan : source.values()) {
      for (Channel channel : chan) {
        add(channel);
      }
    }
  }

  @Override
  public void clear() {
    for (Set<Channel> set : values()) {
      set.clear();
    }
  }

  public boolean add(Channel channel) {
    if (channel != null) {
      return get(channel.getType()).add(channel);
    }
    return false;
  }

}
@@ -131,16 +131,58 @@
 l.Set;%0A%0A
+import com.enderio.core.common.util.Log;%0A%0A
 public c
@@ -624,48 +624,81 @@
     
-throw new UnsupportedOperationException(
+Log.debug(%22Forcing channel type %22 + key);%0A    return super.put(key, value
 );%0A 

Fix error when loading ChannelList from NBT