@Override
 public void readFromNBT(NBTTagCompound tag) {
   super.readFromNBT(tag);
   isAndFunction = tag.getBoolean("isAndFunction");
   operator = ICondition.Operator.values()[tag.getByte("operator")];
 }
 @Override
 public void writeToNBT(NBTTagCompound tag) {
   super.writeToNBT(tag);
   tag.setBoolean("isAndFunction", isAndFunction);
   tag.setByte("operator", (byte) operator.ordinal());
 }